-
Notifications
You must be signed in to change notification settings - Fork 53
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
pygments syntax: improve cylc lexer #2274
Merged
sadielbartholomew
merged 7 commits into
metomi:master
from
oliver-sanders:pygments-lexer-imprevements
Jan 25, 2019
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e848366
cylc_lang: support inter-suite-triggers
oliver-sanders aa20c7d
cylc_lang: support include files
oliver-sanders 5417ff7
cylc_lang: support xtriggers
oliver-sanders c3985be
cylc_lang: support empy + simplify jinja2
oliver-sanders c94354d
cylc_lang: support line continuation in headings
oliver-sanders 5913b6a
cylc_lang: support suicide triggers
oliver-sanders 8f6b852
cylc_lang: support cycle points in inter-cycle offsets
oliver-sanders File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have noticed one omission. Dependencies on specific cycle points e.g.
graph = "red[2019] => blue"
are supported as valid specification within square brackets in a graph string, where only intercycle offsets appear to be recognised by the lexer as-is.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drat.
Turns out you can also do arithmetic (e.g.
[^ + P1D]
) which I didn't know. This is going to be a little trickier to support whilst maintaining error checking.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The good news is the lexer is now so water-tight it picked up on several missing markers in some of the Cylc documentation code excerpts. It's nearly there 👏