PSA: Test your textmate grammars in TextMate #6756
evoactivity
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So with the latest release of linguist, we had included fixes for our glimmer-js and glimmer-ts grammars. We used NovaLightshow to test our grammar as it was capable of reproducing the issues we were seeing, and everything works perfectly there so we had hoped the same would be true for GitHub. It also works perfectly in VSCode and ShikiJS (and possibly other textmate derived syntax highlighting engines).
When we began testing the latest rollout of linguist everything seemed fine until we tested the simplest case our authoring format allows. Namely this
I was stumped on how to test this as it worked everywhere else except GitHub. That is until I decided to install TextMate and try our grammar there, what I saw was identical to how GitHub was highlighting (or not in this case).
Now I had somewhere I could test I managed to fix the grammar
So if you grammar works everywhere but GitHub, and you're wondering how to most accurately test your grammar for GitHub support, I can definitely recommend using TextMate as it seems GitHub's highlighting engine matches TextMate's one-to-one, whereas other engines do not and might highlight things perfectly fine even if GitHub wont.
Beta Was this translation helpful? Give feedback.
All reactions