You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I fixed the first case in my fork but the second looks too complicated.
YAML first highlights comments then injects the regex grammar. end matches don't follow the rules about not overwriting previously consumed matches with new scopes. So the regex grammar overwrites the comment tokens while matching paren pairs.
The regex grammar could highlight comments itself but it might be tricky to restrict to multiline expressions. The YAML grammar can't use the end hack because the beginning # is already consumed by the regex grammar.
Just checking - currently the first comment is formatted and the second is not. But is YAML syntax highlighting our job? (I've just updated the extension with @sndst00m fix to change the extension to .tmLanguage.yml, and I think VSCode does it now)
Anyway, with the official RedHat YAML extension loaded (and not ours) the second comment is not highlighted, and neither is it with Pygments (See here)
So maybe this problem is a hard one (or maybe that comment shouldn't highlight, I've never used YAML for anything!)
I assume the rules are just in the wrong order in the patterns array.
The text was updated successfully, but these errors were encountered: