Created attachment 121880 [details] Screenshot of the issue (wrong color for \end{split} is an equation environment) With the following text using LaTeX syntax highlighting: \begin{equation} \begin{split} 1+1 \end{split} \end{equation} OBSERVED Both "equation" words and the first "split" word are in bold blue. 1+1 is in orange (as probably expected) "split}" is in orange. EXPECTED The second "split" should be in bold blue, the closing brace right after should be in black. VERSION: Updated openSUSE Tumbleweed and Neon docker image. SEE ALSO Related: https://bugs.kde.org/show_bug.cgi?id=274440
When writing "\end{something}" within a Math environment, the highlighter considers it as the end of the same Math environment. For example, in this case, the highlighter believes that "\end{split}" is the end of "equation", but shows incorrect highlighting, since "split" doesn't correspond to a valid keyword of a Math environment. I will upload a patch to fix it.
*** Bug 274440 has been marked as a duplicate of this bug. ***
*** Bug 408297 has been marked as a duplicate of this bug. ***
*** Bug 322081 has been marked as a duplicate of this bug. ***
*** Bug 322144 has been marked as a duplicate of this bug. ***
Git commit 75e233dc579226d89294c3e70a921cc113eb69cc by Jonathan Poelen. Committed on 09/08/2019 at 00:21. Pushed by jpoelen into branch 'master'. Latex: several fixes (math mode, nested verbatim, ...) Summary: - nested { and macro identifier with math mode - add shortintertext, Cref, param with math env and fix providecommand - text macro in math mode - nested verbatim - ... Related: bug 320303 Reviewers: #framework_syntax_highlighting, dhaumann, cullmann Reviewed By: #framework_syntax_highlighting, cullmann Subscribers: nibags, kde-frameworks-devel, kwrite-devel Tags: #kate, #frameworks Differential Revision: https://phabricator.kde.org/D23013 M +3 -3 autotests/folding/example.rmd.fold M +183 -6 autotests/folding/highlight.tex.fold D +0 -5 autotests/folding/test.tex.fold M +182 -5 autotests/html/highlight.tex.html D +0 -12 autotests/html/test.tex.html M +177 -0 autotests/input/highlight.tex D +0 -5 autotests/input/test.tex M +186 -9 autotests/reference/highlight.tex.ref D +0 -5 autotests/reference/test.tex.ref M +2 -2 autotests/syntaxrepository_test.cpp M +685 -275 data/syntax/latex.xml https://commits.kde.org/syntax-highlighting/75e233dc579226d89294c3e70a921cc113eb69cc