summaryrefslogtreecommitdiffstats
path: root/kate/data/javascript.xml
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2014-06-03 11:56:45 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2014-06-03 11:56:45 +0900
commit790fe12d34447ad8549fcb75acf05d056e6743c6 (patch)
tree073e5d03f35ee5a476ca361887b3f80b348a42de /kate/data/javascript.xml
parent668ae23f0693a330b241cfc62cde668a47d8654d (diff)
downloadtdelibs-790fe12d34447ad8549fcb75acf05d056e6743c6.tar.gz
tdelibs-790fe12d34447ad8549fcb75acf05d056e6743c6.zip
Kate syntax highlighting files update - Jun 2014
Diffstat (limited to 'kate/data/javascript.xml')
-rw-r--r--kate/data/javascript.xml13
1 files changed, 12 insertions, 1 deletions
diff --git a/kate/data/javascript.xml b/kate/data/javascript.xml
index 260aa721a..dc124041e 100644
--- a/kate/data/javascript.xml
+++ b/kate/data/javascript.xml
@@ -3,7 +3,7 @@
<!-- Author: Anders Lund <anders@alweb.dk> //-->
<!-- Minor changes: Joseph Wenninger <jowenn@kde.org> //-->
<!-- Full JavaScript 1.0 support by Whitehawk Stormchaser //-->
-<language name="JavaScript" version="1.22" kateversion="2.4" section="Scripts" extensions="*.js;*.kwinscript"
+<language name="JavaScript" version="1.23" kateversion="2.4" section="Scripts" extensions="*.js;*.kwinscript"
mimetype="text/x-javascript;application/x-javascript" indenter="cstyle"
author="Anders Lund (anders@alweb.dk), Joseph Wenninger (jowenn@kde.org), Whitehawk Stormchaser (zerokode@gmx.net)" license="">
<highlighting>
@@ -64,6 +64,17 @@
<item> undefined </item>
</list>
<contexts>
+
+ <!-- Shebang: ("#!") Detect shebang and fallthrough to Normal -->
+ <!-- Based on the similar clause from prolog.xml, which notes the following BUG:
+ If the file starts with whitespace and a shebang on a line other than the first line,
+ this rule will still match it as a shebang, even tough the shebang is only valid on
+ the very first line.
+ -->
+ <context name="Shebang" lineEndContext="Normal" attribute="Syntax Error" fallthrough="true" fallthroughContext="Normal" >
+ <Detect2Chars column="0" char="#" char1="!" context="Comment" attribute="Comment" />
+ </context>
+
<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
<DetectSpaces/>
<StringDetect attribute="Region Marker" context="region_marker" String="//BEGIN" beginRegion="Region1" />