[PATCH] Python syntax highlighting: not working correctly for escape sequences The syntax highlighting file python.xml in version 5.22 does not highlight correctly escape sequences. The highlighting for two-digit hex values is C-style, but Python’s syntax is different. There is no support for the other escape sequences. That‘s a little bit annoying when you have to work a lot with escape sequences. Attached a new python.xml file that solves these issues. I have tested it while working in KDevelop 4.7. Reproducible: Always
Created attachment 99902 [details] python.xml
Looks like something got lost in lines 518—520: <!-- As this highlighting style is for both, Python 2 and 3, we do not know if a normal string is “unicode” or not. So we -->
Created attachment 100567 [details] python.xml The documentation has been fixed.
In ktexteditor.git, we already have version 2.28 of python.xml, could you rebase your change on that?
Created attachment 100940 [details] python.xml Rebased against 2.28 like in https://quickgit.kde.org/?p=ktexteditor.git&a=blob&hb=2ee8046be4aa7a15fb739352d82c73a2949777db&f=src%2Fsyntax%2Fdata%2Fpython.xml However I could not test it, because now it’s KDE5 only. So testing in KDevelop 4.7 does not work anymore. And I did not figure out how to test a new syntax hightlighting file in KWrite/Kate in KDE5.
Ok, will try out and push ;=) Thanks for the patch, btw.!!
Git commit 7aa402317366198bada262da0364d2f0af427ecb by Christoph Cullmann. Committed on 05/09/2016 at 18:44. Pushed by cullmann into branch 'master'. Bug 365171 - Python syntax highlighting: not working correctly for escape sequences Patch by Lukas Sommer Added deps for generated index to ensure we regenerate the qrc M +1 -1 src/CMakeLists.txt M +6 -0 src/syntax/data/CMakeLists.txt M +19 -5 src/syntax/data/python.xml http://commits.kde.org/ktexteditor/7aa402317366198bada262da0364d2f0af427ecb