highlight.js
highlight.js copied to clipboard
Fix bug in Leaf keyword highlighting
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
- [x] Added markup tests, or they don't apply here because...
- [x] Updated the changelog at
CHANGES.md
Thanks! Please also add a changelog entry as well as markup test case.
Please also add a changelog entry as well as markup test case.
@joshgoebel done! I hope I did it correctly
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.
#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.
Ah, I see. :)
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 |
@joshgoebel do we need anything else to get this merged?
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
Hi, can we please get this merged?
Hi, just another friendly ping on this PR