Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Astro mode syntax highlighting #5269

Merged
merged 7 commits into from
Oct 13, 2023
Merged

Conversation

legendSabbir
Copy link
Contributor

Description of changes:

Syntax highlighting for Astro mode

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@akoreman
Copy link
Contributor

Thanks for your contribution, could you also add an example doc for the mode to the demo/kitchen-sink/docs folder and add it to the modelist in src/ext/modelist.js. For reference on what to add where, see PR #5169.

@legendSabbir
Copy link
Contributor Author

legendSabbir commented Jul 27, 2023

@akoreman hey i've added a file to kitchen sink and also added in modelist . also made little change on the mode file

@akoreman
Copy link
Contributor

Could you:

  • fix the issues thrown by the linter in the built.
  • remove the mode and highlight rules files from the src folder (they should only be in the src/mode folder).

@legendSabbir
Copy link
Contributor Author

@akoreman try now

@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Patch coverage: 60.31% and project coverage change: -0.04% ⚠️

Comparison is base (bccff5a) 87.23% compared to head (430603c) 87.19%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5269      +/-   ##
==========================================
- Coverage   87.23%   87.19%   -0.04%     
==========================================
  Files         565      567       +2     
  Lines       45288    45351      +63     
  Branches     6929     6941      +12     
==========================================
+ Hits        39508    39546      +38     
- Misses       5780     5805      +25     
Flag Coverage Δ
unittests 87.19% <60.31%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/mode/astro_highlight_rules.js 50.98% <50.98%> (ø)
src/mode/astro.js 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@akoreman
Copy link
Contributor

thanks for fixing the build errors, mode looks good to me. Could you add some tests covering the mode (see for example here for an example of tests for a mode)

@legendSabbir
Copy link
Contributor Author

I don't think i can do this . Isn't it optional 😕 ? if it's needed then Can you do it 😅

@InspiredGuy
Copy link
Contributor

The new Astro mode just inherits HTMLMode, so the tests for the mode itself are not really necessary. I'm merging this PR assuming one of the next mode-related PRs will regenerate tokens for highlight rule tests which will include Astro mode as well.

@InspiredGuy InspiredGuy merged commit 55bb654 into ajaxorg:master Oct 13, 2023
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants