Bug 348317

Summary: [PATCH] Katepart syntax highlighting should recognize \u0123 style escapes for JavaScript
Product: [Applications] kate Reporter: Lukas Sommer <sommerluk>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: cullmann, sommerluk
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In:
Attachments: javascript.xml
javascript.diff
javascript.diff

Description Lukas Sommer 2015-05-27 15:29:09 UTC
In JavaScript strings, you can use simple escapes like \n. Katepart syntax highlighting recognizes them.

But katepart syntax highlighting ignored "unicode escapes" like \u0123 which makes referecne to a Unicode code point in hexadecimal notation.

A solution/patch is attached.

Reproducible: Always
Comment 1 Lukas Sommer 2015-05-27 15:30:03 UTC
Created attachment 92865 [details]
javascript.xml
Comment 2 Christoph Cullmann 2015-05-31 16:10:33 UTC
Hi, could you create a patch out of that? I think the version you based it on is already outdated, would make the application much easier ;=)
Comment 3 Lukas Sommer 2015-06-03 09:44:31 UTC
Yes, I can create a patch.

Could you point me a link to the current version of javascript.xml, please? (I was searching for it on Git, but apparently I did not pick up the most recent version.)
Comment 5 Lukas Sommer 2015-06-09 20:44:39 UTC
Created attachment 93096 [details]
javascript.diff

Patch against current version provided.
Comment 6 Lukas Sommer 2015-06-09 20:53:10 UTC
Created attachment 93097 [details]
javascript.diff
Comment 7 Christoph Cullmann 2015-07-11 14:12:19 UTC
Git commit 076de5273b29b818c3f9e8f1d1323d344581354c by Christoph Cullmann.
Committed on 11/07/2015 at 14:11.
Pushed by cullmann into branch 'master'.

Bug 348317 - [PATCH] Katepart syntax highlighting should recognize \u0123 style escapes for JavaScript

M  +3    -1    src/syntax/data/javascript.xml

http://commits.kde.org/ktexteditor/076de5273b29b818c3f9e8f1d1323d344581354c
Comment 8 Christoph Cullmann 2015-07-11 14:12:58 UTC
Thanks for the patch!