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
Update lists of operators/keywords in Julia and expand/refine highlighting #1715
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hopefully fixes pypy3 CI failure
Anteru
added
the
changelog-update
Items which need to get mentioned in the changelog
label
Mar 5, 2021
Merged, thanks a lot for this huge update! |
Anteru
removed
the
changelog-update
Items which need to get mentioned in the changelog
label
Mar 5, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It appears the Julia highlighting rules have not recently been updated. To me it appears the current syntax definitions probably predate Julia v0.7, and much has changed since then. I was motivated in particular to fix parsing of the "broadcast expression" helper macro
@.
which currently isn't recognized, but once I got going, I made many other changes to try to bring the definition up to date.I'd like to recognize
@fredrikekre
in particular for inspiring me to make changes here based on some of what he did for highlight.js (blog post and code branch).Some of the more notable changes are:
@.
is now recognized as valid.+¹
or custom transpose'ᵀ
).raw""
strings which do not interpolate.mystring"contents"suffix
now identify their prefix/suffix as affixes.where
expression where names can be highlighted with little chance of being wrong.julia-repl
highlighting alias is added to match Julia's own convention for use in Markdown documentation files.