Bug 415384

Summary: LaTeX braces matching in \input is off
Product: [Applications] kate Reporter: matpi <matpi>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nibgonz, raphael.kde
Priority: NOR    
Version First Reported In: 19.12.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.66.0
Sentry Crash Report:

Description matpi 2019-12-20 07:33:44 UTC
SUMMARY
In LaTeX highlighting, using commands with braces inside an \input{} argument wrongly matches the opening brace of the \input with the closing brace of the inner command, i.e. the opening brace of the inner command is ignored.


STEPS TO REPRODUCE
1. Open a new Kate document
2. Switch the highlighting to LaTeX
3. Type in: \input{\a{}}
4. (\a can be replaced by another command, or even left out)

OBSERVED RESULT
The first opening brace is matched with the first closing one.

EXPECTED RESULT
The braces of the \input (outer braces) should match together, and the inner ones (of the \a) together.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Nibaldo G. 2019-12-23 01:03:31 UTC
Git commit 6ddf50d243dd973614dc5f57f366cb952310a2cd by Nibaldo González.
Committed on 23/12/2019 at 01:03.
Pushed by ngonzalez into branch 'master'.

LaTeX: fix brackets in some commands

Summary:

In the parameter of some commands, such as `\input{\a{}}`, the brackets are closed incorrectly, which causes the pairs of brackets to be marked incorrectly.

Reviewers: #framework_syntax_highlighting, cullmann

Reviewed By: #framework_syntax_highlighting, cullmann

Subscribers: cullmann, kwrite-devel, kde-frameworks-devel

Tags: #kate, #frameworks

Differential Revision: https://phabricator.kde.org/D26151

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  +3    -1    data/syntax/latex.xml

https://commits.kde.org/syntax-highlighting/6ddf50d243dd973614dc5f57f366cb952310a2cd
Comment 2 matpi 2019-12-23 08:25:22 UTC
Thank you!
Comment 3 Nibaldo G. 2019-12-24 04:20:14 UTC
Fixed in KDE Frameworks 5.66
Comment 4 Christophe Marin 2020-05-04 17:32:07 UTC
*** Bug 409849 has been marked as a duplicate of this bug. ***