jlelong / vscode-latex-basics

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

`minted` code block matching for multiline options #22

Closed frankli0324 closed 1 year ago

frankli0324 commented 2 years ago

A clear and concise description of what the bug is.

minted options would have to stay on the same line in order for code highlighting to work https://github.com/jlelong/vscode-latex-basics/blob/4479589c0f5c21c7f5ef17551e1013ab72e7f718/syntaxes/LaTeX.tmLanguage.json#L156

A minimal example to reproduce the issue

image image
jlelong commented 2 years ago

VS Code uses the textmate engine for syntax highlighting. The rules are matched again a single line of the document at a time, which makes handling multi-line constructions very complicated. I will investigate this to see if we can accept multi-line options without jeopardising the maintenance of the grammar file.