Bug 380408

Summary: [PATCH] C++: '-' is not a part of UDL String
Product: [Frameworks and Libraries] frameworks-syntax-highlighting Reporter: Jonathan Poelen <jonathan.poelen>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.31.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.37
Sentry Crash Report:

Description Jonathan Poelen 2017-05-31 23:03:45 UTC
In the expression: ""_d+n

This is considered as a string while there is an operator-

The suggested fix is to replace

<RegExpr attribute="String" context="#pop#pop" String="_[_0-9A-Z-a-z]*\b" />

with

<RegExpr attribute="String" context="#pop#pop" String="_[_0-9A-Za-z]*\b" />


Implemented here:

https://github.com/jonathanpoelen/syntax-highlighting/commit/9b5b451830a4d777beea556eaeb9a6e0886b1802
Comment 1 Dominik Haumann 2017-07-23 08:52:10 UTC
Git commit da8357644d3c620839598403e07fa0c37ca323d0 by Dominik Haumann.
Committed on 23/07/2017 at 08:51.
Pushed by dhaumann into branch 'master'.

C++: Fix '-' is not a part of UDL String

FIXED-IN: 5.37

M  +1    -1    autotests/folding/highlight.cpp.fold
M  +1    -1    autotests/html/highlight.cpp.html
M  +1    -1    autotests/input/highlight.cpp
M  +1    -1    autotests/reference/highlight.cpp.ref
M  +4    -5    data/syntax/isocpp.xml

https://commits.kde.org/syntax-highlighting/da8357644d3c620839598403e07fa0c37ca323d0