Summary: | Wrong LaTeX syntax highlighting after braces in optional argument of \cite | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-syntax-highlighting | Reporter: | |
Component: | syntax | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | deadalps, nibgonz |
Priority: | NOR | ||
Version: | 5.68.0 | ||
Target Milestone: | --- | ||
Platform: | Kubuntu | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/syntax-highlighting/213d4bb197a3d86c053a5f9a2d31a665f0864602 | Version Fixed In: | 5.69.0 |
Attachments: | Screenshot of the wrong highlighting. |
Git commit 213d4bb197a3d86c053a5f9a2d31a665f0864602 by Christoph Cullmann, on behalf of Nibaldo González. Committed on 26/03/2020 at 15:48. Pushed by cullmann into branch 'master'. LaTeX: fix math parentheses in optional labels Summary: Single parentheses within `[...]` were highlighted as math text, but the math text is `\(...\)`. Reviewers: #framework_syntax_highlighting, dhaumann, cullmann, jpoelen Reviewed By: #framework_syntax_highlighting, cullmann Subscribers: kwrite-devel, kde-frameworks-devel Tags: #kate, #frameworks Differential Revision: https://phabricator.kde.org/D28303 M +4 -0 autotests/folding/highlight.tex.fold M +4 -0 autotests/html/highlight.tex.html M +4 -0 autotests/input/highlight.tex M +4 -0 autotests/reference/highlight.tex.ref M +4 -4 data/syntax/latex.xml https://commits.kde.org/syntax-highlighting/213d4bb197a3d86c053a5f9a2d31a665f0864602 *** Bug 419484 has been marked as a duplicate of this bug. *** |
Created attachment 126863 [details] Screenshot of the wrong highlighting. SUMMARY If a cite command with () inside the optional argument is used, all text is highlighted thereafter. STEPS TO REPRODUCE 1. Open a new document. 2. Enable LaTeX syntax highlighting (Tools->Highlighting->Markup->LaTeX). 3. Add the following text. Text should be black. \cite[eq. 1.1]{some_reference} After a reference without braces inside [...], everything is fine. \cite[eq. (1.1)]{some_reference} Now, the text goes on in orange forever... OBSERVED RESULT "(1.1)]{some_reference}" and "Now, the text goes on in orange forever..." are highlighted in orange. EXPECTED RESULT "(1.1)]{some_reference}" and "Now, the text goes on in orange forever..." are not highlighted. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: 5.16.5 KDE Frameworks Version: 5.62.0 Qt Version: 5.12.4 ADDITIONAL INFORMATION