texstudio-org / texstudio

TeXstudio is a fully featured LaTeX editor. Our goal is to make writing LaTeX documents as easy and comfortable as possible.
http://www.texstudio.org/
GNU General Public License v3.0
2.76k stars 343 forks source link

problem with math highlighting in keyvals #2138

Closed mbertucci47 closed 2 years ago

mbertucci47 commented 2 years ago

Environment

Screenshot 2022-02-28 135531

The dollar signs are not highlighted and it doesn't recognize the content as in a math environment. Braces fix the highlighting but the first should still be valid. This behavior occurs wherever you have key=%<value%> in a cwl, and regardless of whether the command was specified with a #c in the #keyvals: ... #endkeyvals structure.

sunderme commented 2 years ago

can you add the example. Not keen on copying by hand.

mbertucci47 commented 2 years ago
\documentclass{article}
\usepackage{enumitem}

\begin{document}
\begin{itemize}[label=$\diamond$]
\item text
\end{itemize}
\begin{itemize}[label={$\diamond$}]
\item text
\end{itemize}
\end{document}
mbertucci47 commented 1 week ago

With 4.8.3alpha1 this problem seems to have resurfaced. The example above now displays the same as it did before https://github.com/texstudio-org/texstudio/commit/6274fe778e3d0c2cae1f1e44eced759df2be9ce9