Bug 322154 - LaTeX highlighting error for \lstinline[]{...}
Summary: LaTeX highlighting error for \lstinline[]{...}
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: syntax (show other bugs)
Version: 3.10.3
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-09 13:07 UTC by Barade
Modified: 2013-08-12 08:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.1


Attachments
Patch to fix lstinline highlighting (2.13 KB, patch)
2013-08-11 20:54 UTC, Michael
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Barade 2013-07-09 13:07:39 UTC
When placing "\lstinline[]{my code dasd } saddasddasd" somewhere it highlights code from the first ] until a line break including text after the } char.

Reproducible: Always
Comment 1 Dominik Haumann 2013-07-15 16:00:58 UTC
Nikos, since you also sent a patch with respect to lstinline in bug #234846, can you comment on this here and maybe also send a patch?
Comment 2 Dominik Haumann 2013-08-09 12:03:02 UTC
Michael, can you maybe have a look?
Comment 3 Michael 2013-08-11 20:54:05 UTC
Hi,

See attached patch to fix this strange highlighting issue.

Details: Broke out lstinline into it's own case because it takes optional parameters, and thus can't be lumped in with \verb

All of the usage cases work for me below

Text, code: \lstinline@int i=4;@ and back to normal text. \\
Text, code: \lstinline{int i=8;} and back to normal text. \\
Text, code: \lstinline[]^int i=4;^ and back to normal text. \\
Text, code: \lstinline[columns=fixed]{int i=4;} and back to normal text. \\
Text, code: \lstinline[columns=fixed]!int i=4;! and back to normal text. \\
Comment 4 Michael 2013-08-11 20:54:38 UTC
Created attachment 81647 [details]
Patch to fix lstinline highlighting
Comment 5 Dominik Haumann 2013-08-12 07:54:11 UTC
Git commit d78263ceef0e5dc4b6d7d169f54669812e37850c by Dominik Haumann.
Committed on 12/08/2013 at 07:53.
Pushed by dhaumann into branch 'master'.

fix LaTeX highlighting error for \lstinline[]{...}

Thanks to Michael for the patch!

FIXED-IN: 4.11.1

M  +18   -2    part/syntax/data/latex.xml

http://commits.kde.org/kate/d78263ceef0e5dc4b6d7d169f54669812e37850c
Comment 6 Dominik Haumann 2013-08-12 08:03:10 UTC
Git commit 63e939b3dff41e4673e157f51caa0cf3e67da50b by Dominik Haumann.
Committed on 12/08/2013 at 07:53.
Pushed by dhaumann into branch 'KDE/4.11'.

fix LaTeX highlighting error for \lstinline[]{...}

Thanks to Michael for the patch!

FIXED-IN: 4.11.1

M  +18   -2    part/syntax/data/latex.xml

http://commits.kde.org/kate/63e939b3dff41e4673e157f51caa0cf3e67da50b