jlelong / vscode-latex-basics

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

Highlight with label optional arguments #20

Closed Serene-Arc closed 2 years ago

Serene-Arc commented 2 years ago

As discussed here, creating a new PR so that labels with optional parameters are recognised and highlighted accordingly.

jlelong commented 2 years ago

As far as I know, the default \label command does not take any optional argument. Where is that redefined label command coming from?

Serene-Arc commented 2 years ago

This is part of cleverref at the very least. If you look at the cleverref documentation, it mentions the optional argument on page 9 when overriding types.

So it's not part of the base LaTeX but I feel that cleverref is a commonly used package, and it shouldn't harm the syntax recognition of anyone that isn't using it in a document.