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

Made jinja2 subsitution regex less greedy in gedit syntax highlighter #6285

Merged

Conversation

pdearnshaw
Copy link
Contributor

@pdearnshaw pdearnshaw commented Aug 6, 2024

The regex for jinja2 subsitution in gedit syntax highlighter is too greedy, for example if you have two variables on a single line then all the text between the two variables gets highlighted as jinja2 instead of just the variables. e.g.

{{VAR1}} extra text {{VAR2}}

would have the "extra text" syntax highlighted as jinja2, where as with the change only the {{VAR1}} and {{VAR2}} would be syntax highlighted as jinja2.

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • Changelog entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@pdearnshaw pdearnshaw changed the title Made jinja2 subsitution regex less greedy Made jinja2 subsitution regex less greedy in gedit syntax highlighter Aug 6, 2024
@oliver-sanders oliver-sanders added this to the 8.4.0 milestone Aug 6, 2024
Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, tested in gedit, works nicely, thanks.

@oliver-sanders oliver-sanders merged commit 4a7c1ae into cylc:master Aug 6, 2024
1 of 12 checks passed
@pdearnshaw pdearnshaw deleted the update_gedit_syntax_highlighting branch August 13, 2024 11:28
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.

2 participants