Skip to content

Conversation

fpseverino
Copy link

@fpseverino fpseverino commented Apr 28, 2025

Changes

Fix a bug in the Leaf syntax where keywords are highlighted when at the start of a variable name (see the third code block here)

Checklist

  • Added markup tests, or they don't apply here because...
  • Updated the changelog at CHANGES.md

@joshgoebel
Copy link
Member

Thanks! Please also add a changelog entry as well as markup test case.

@fpseverino
Copy link
Author

Please also add a changelog entry as well as markup test case.

@joshgoebel done! I hope I did it correctly

@joshgoebel
Copy link
Member

Except we need a test that would have failed before - so that we prevent this regression in the future... so we need an example of what would have failed before.

@fpseverino
Copy link
Author

#elseif(index == "Welcome back!"):

This would have failed, as the in in index would have been highlighted as a keyword.
There was already in the test another case in which in is correctly highlighted as a keyword.

@joshgoebel
Copy link
Member

Ah, I see. :)

Copy link

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

3 files changed

Total change +60 B

View Changes
file base pr diff
es/languages/leaf.min.js 435 B 464 B +29 B
highlight.min.js 8.23 KB 8.23 KB +1 B
languages/leaf.min.js 439 B 469 B +30 B

@fpseverino
Copy link
Author

@joshgoebel do we need anything else to get this merged?

@fpseverino
Copy link
Author

Hi @joshgoebel, I just wanted to kindly follow up on this PR, just making sure it hasn’t been lost in the shuffle.
Let me know if there’s anything you'd like me to adjust

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