syntax highlighter incorrect in nested latex environment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kile |
Fix Released
|
Low
|
|||
kile (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hi,
This bug probably classifies as a polish bug, but I've stumbled upon some LaTeX code that causes incorrect syntax highlighting.
1) $ lsb_release -rd
Description: Ubuntu 12.04.2 LTS
Release: 12.04
2) $ apt-cache policy kile
kile:
Installed: 1:2.1.0-1ubuntu2.1
Candidate: 1:2.1.0-1ubuntu2.1
Version table:
*** 1:2.1.0-1ubuntu2.1 0
500 http://
100 /var/lib/
1:
500 http://
The following code, when pasted into the Kile editor, highlights the second "cases" wrong:
\begin{align}
U_{bg}(z) = \begin{cases}
\end{align}
3) Expectation is that the colour of the second 'cases' matches the first (blue)
4) Actual result is that it got highlighted in green rather than blue
Misc:
- The LaTeX code is correct, it compiles without warnings or errors.
- See the attached screenshot for a visualisation
Changed in kile: | |
importance: | Unknown → Low |
status: | Unknown → New |
Changed in kile: | |
status: | New → Fix Released |
Changed in kile (Ubuntu): | |
status: | New → Fix Released |
Hmmm. The fix was pretty simple, add "cases" to the MathEnv list in /usr/share/ kde4/apps/ katepart/ syntax/ latex.xml
See attached patch!
Cheers,
Michael