jlelong / vscode-latex-basics

LaTeX grammars for Visual Studio Code
MIT License
19 stars 10 forks source link

Incorrect match for punctuation.definition.string.begin.latex #66

Closed gpoore closed 1 year ago

gpoore commented 1 year ago

In LaTeX.tmLanguage.json, the token punctuation.definition.string.begin.latex currently has the begin pattern (?<!\\\\)(\\`\\`). I suggest extending the negative lookbehind to eliminate incorrect matches. I just encountered \catcode``, and \string`` would be similar. A begin pattern like (?<!\\\\|\\\\catcode|\\\\string)(\\`\\`) would be better. There may be other situations that could cause an incorrect match, but I expect that this modification would cover most common cases.