Bug 428947 - Wrong LaTeX highlighting for bmatrix
Summary: Wrong LaTeX highlighting for bmatrix
Status: RESOLVED FIXED
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (show other bugs)
Version: 5.75.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-11 00:13 UTC by Vincent Tam
Modified: 2020-11-23 11:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
error result (33.66 KB, image/png)
2020-11-11 00:13 UTC, Vincent Tam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Tam 2020-11-11 00:13:39 UTC
Created attachment 133213 [details]
error result

SUMMARY

The `bmatrix` environment is treated like an error in line 804 in `data/syntax/latex.xml` at commit 9ca2992a.

https://github.com/KDE/syntax-highlighting/blob/9ca2992afcaf9cafe57ef21459bdfaf78125fc22/data/syntax/latex.xml#L804


STEPS TO REPRODUCE
1. Save this file in `test.md`.

```tex
\begin{equation}
  \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}
\end{equation}
```

2. Compile this with `pandoc test.md -o test.pdf`.  (I used pandoc 2.11.)
3. Open `test.pdf` and observe the color difference in `bmatrix`.

OBSERVED RESULT
They have different colors.

EXPECTED RESULT
They have the same color.

SOFTWARE/OS VERSIONS
Ubuntu 20.04, pandoc 2.11, TexLive 2020

ADDITIONAL INFORMATION
https://github.com/jgm/skylighting/issues/111
Comment 1 Bug Janitor Service 2020-11-23 01:25:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/109
Comment 2 Vincent Tam 2020-11-23 07:35:58 UTC
Thanks for info, but there's no mention about the "Error" attribute in the code change.  It seems that it's removing something underlined, but there's no underlined stuff in the screenshot.
Comment 3 Christoph Cullmann 2020-11-23 11:51:02 UTC
Git commit a29ad9cd1973f413852cb73df0ecb543f537ae09 by Christoph Cullmann, on behalf of Jonathan Poelen.
Committed on 23/11/2020 at 11:50.
Pushed by cullmann into branch 'master'.

Latex: some math environments can be nested

M  +1    -1    autotests/html/highlight.tex.dark.html
M  +1    -1    autotests/html/highlight.tex.html
M  +1    -1    autotests/reference/highlight.tex.ref
M  +0    -2    data/syntax/latex.xml

https://invent.kde.org/frameworks/syntax-highlighting/commit/a29ad9cd1973f413852cb73df0ecb543f537ae09