packages feed

skylighting-core 0.8.4 → 0.8.5

raw patch · 13 files changed

+202/−100 lines, 13 files

Files

changelog.md view
@@ -1,5 +1,20 @@ # Revision history for skylighting and skylighting-core +## 0.8.5++  * Respect dynamic flag on StringDetect elements (#99, Albert+    Krewinkel).++  * Increase test timeout to avoid failures with qemu-emulated+    environments, such as qemu and riscv64 in Ubuntu builders+    (William Grant).++  * Fix attribute for opening double quote in sql-postgresql.xml+    (Benjamin Wuethrich).++  * Update syntax descriptions for javascript, bash, coffee,+    javascript-react, javascript, latex, sql-postgresql, typescript.+ ## 0.8.4    * HTML output: use aria-hidden="true" on empty a elements
skylighting-core.cabal view
@@ -1,5 +1,5 @@ name:                skylighting-core-version:             0.8.4+version:             0.8.5 synopsis:            syntax highlighting library description:         Skylighting is a syntax highlighting library.                      It derives its tokenizers from XML syntax
src/Skylighting/Tokenizer.hs view
@@ -20,7 +20,7 @@ import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.UTF8 as UTF8 import Data.CaseInsensitive (mk)-import Data.Char (isAlphaNum, isAscii, isLetter, isPrint, isSpace, ord)+import Data.Char (isAlphaNum, isAscii, isDigit, isLetter, isPrint, isSpace, ord) import qualified Data.Map as Map import Data.Maybe (catMaybes) import qualified Data.Set as Set@@ -309,7 +309,8 @@                 Float -> withAttr attr $ parseFloat inp                 Keyword kwattr kws -> withAttr attr $ keyword kwattr kws inp                 StringDetect s -> withAttr attr $-                                    stringDetect (rCaseSensitive rule) s inp+                                    stringDetect (rDynamic rule) (rCaseSensitive rule)+                                                 s inp                 WordDetect s -> withAttr attr $                                     wordDetect (rCaseSensitive rule) s inp                 LineContinue -> withAttr attr $ lineContinue inp@@ -372,15 +373,31 @@   guard $ isWordBoundary c d   takeChars (Text.length t) -stringDetect :: Bool -> Text -> ByteString -> TokenizerM Text-stringDetect caseSensitive s inp = do-  t <- decodeBS $ UTF8.take (Text.length s) inp+stringDetect :: Bool -> Bool -> Text -> ByteString -> TokenizerM Text+stringDetect dynamic caseSensitive s inp = do+  s' <- if dynamic+        then do+          dynStr <- subDynamicText s+          info $ "Dynamic string: " ++ show dynStr+          return dynStr+        else return s+  t <- decodeBS $ UTF8.take (Text.length s') inp   -- we assume here that the case fold will not change length,   -- which is safe for ASCII keywords and the like...   guard $ if caseSensitive-             then s == t-             else mk s == mk t-  takeChars (Text.length s)+             then s' == t+             else mk s' == mk t+  takeChars (Text.length s')++subDynamicText :: Text -> TokenizerM Text+subDynamicText t = do+  let substitute x = case Text.uncons x of+        Just (c, rest) | isDigit c -> let capNum = ord c - ord '0'+                                      in (<> rest) <$> getCapture capNum+        _ -> return $ Text.cons '%' x+  case Text.split (== '%') t of+    []     -> return Text.empty+    x:rest -> (x <>) . Text.concat <$> mapM substitute rest  -- This assumes that nothing significant will happen -- in the middle of a string of spaces or a string
test/expected/abc.javascript.native view
@@ -40,7 +40,7 @@   , ( OperatorTok , "=" )   , ( NormalTok , " [" )   , ( OperatorTok , "..." )-  , ( AttributeTok , "word" )+  , ( NormalTok , "word" )   , ( OperatorTok , "." )   , ( FunctionTok , "toUpperCase" )   , ( NormalTok , "()]" )@@ -178,7 +178,8 @@   , ( SpecialCharTok , "}" )   , ( VerbatimStringTok , ": " )   , ( SpecialCharTok , "${" )-  , ( NormalTok , "isWordPossible(word)" )+  , ( FunctionTok , "isWordPossible" )+  , ( NormalTok , "(word)" )   , ( SpecialCharTok , "}" )   , ( VerbatimStringTok , "`" )   , ( NormalTok , "))" )
test/expected/hk91.html.native view
@@ -66,7 +66,9 @@ , [ ( NormalTok , "  " ) , ( KeywordTok , "</script>" ) ] , [] , [ ( NormalTok , "  " ) , ( KeywordTok , "<script>" ) ]-, [ ( NormalTok , "    $(" )+, [ ( NormalTok , "    " )+  , ( FunctionTok , "$" )+  , ( NormalTok , "(" )   , ( BuiltInTok , "document" )   , ( NormalTok , ")" )   , ( OperatorTok , "." )
test/test-skylighting.hs view
@@ -193,7 +193,7 @@  noDropTest :: TokenizerConfig -> [Text] -> Syntax -> TestTree noDropTest cfg inps syntax =-  localOption (mkTimeout 9000000)+  localOption (mkTimeout 15000000)   $ testCase (Text.unpack (sName syntax))   $ mapM_ go inps     where go inp =@@ -210,7 +210,7 @@                 assertFailure (show e ++ "\ninput = " ++ show inp))  tokenizerTest :: TokenizerConfig -> SyntaxMap -> Bool -> FilePath -> TestTree-tokenizerTest cfg sMap regen inpFile = localOption (mkTimeout 9000000) $+tokenizerTest cfg sMap regen inpFile = localOption (mkTimeout 15000000) $   goldenTest testname getExpected getActual       (compareValues referenceFile) updateGolden   where testname = lang ++ " tokenizing of " ++ inpFile
xml/bash.xml view
@@ -7,8 +7,9 @@         <!ENTITY eos      "(?=($|\s))">                 <!-- eol or space following -->         <!ENTITY noword   "(?![\w$+-])">                <!-- no word, $, + or - following -->         <!ENTITY pathpart "([\w_@.&#37;*?+-]|\\ )">     <!-- valid character in a file name -->+        <!ENTITY charbeforecomment "[\s;]">             <!-- character before a comment # --> ]>-<language name="Bash" version="9" kateversion="5.0" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.nix;.bashrc;.bash_profile;.bash_login;.profile;PKGBUILD;APKBUILD" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">+<language name="Bash" version="10" kateversion="5.0" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.nix;.bashrc;.bash_profile;.bash_login;.profile;PKGBUILD;APKBUILD" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">  <!-- (c) 2004 by Wilbert Berendsen (wilbert@kde.nl)     Changes by Matthew Woehlke (mw_triad@users.sourceforge.net)@@ -473,6 +474,9 @@       <!-- FindMost tries to interpret anything except commands -->       <context attribute="Normal Text" lineEndContext="#stay" name="FindMost">         <IncludeRules context="FindComments" />+        <IncludeRules context="FindMostWithoutComments" />+      </context>+      <context attribute="Normal Text" lineEndContext="#stay" name="FindMostWithoutComments">         <IncludeRules context="FindStrings" />         <IncludeRules context="FindSubstitutions" />         <IncludeRules context="FindOthers" />@@ -482,8 +486,14 @@       <!-- FindComments consumes shell comments till EOL -->       <context attribute="Normal Text" lineEndContext="#pop" name="FindComments">         <DetectChar attribute="Comment" context="Comment" char="#" firstNonSpace="true"/>-        <RegExpr attribute="Normal Text" context="Comment" String="\s*[\s;](?=#)" />+        <RegExpr attribute="Comment" context="Comment" String="(?&lt;=&charbeforecomment;)#" />       </context>+      <context attribute="Normal Text" lineEndContext="#pop" name="FindCommentsInCommand">+        <DetectChar attribute="Comment" context="Comment" char="#" firstNonSpace="true"/>+        <!-- NOTE: If a rule already matches a character of &charbeforecomment;+             (for example, in an escaped character), the comment will not be highlighted. -->+        <RegExpr attribute="Normal Text" context="Comment" String="&charbeforecomment;(?=#)" />+      </context>       <context attribute="Comment" lineEndContext="#pop" name="Comment">         <IncludeRules context="##Alerts" />         <IncludeRules context="##Modelines" />@@ -492,7 +502,7 @@       <!-- FindCommentsParen consumes shell comments till EOL or a closing parenthese -->       <context attribute="Normal Text" lineEndContext="#pop" name="FindCommentsParen">         <DetectChar attribute="Comment" context="CommentParen" char="#" firstNonSpace="true"/>-        <RegExpr attribute="Normal Text" context="CommentParen" String="[\s;](?=#)" />+        <RegExpr attribute="Normal Text" context="CommentParen" String="&charbeforecomment;(?=#)" />       </context>       <context attribute="Comment" lineEndContext="#pop" name="CommentParen">         <RegExpr attribute="Comment" context="#pop" String="[^)](?=\))" />@@ -502,7 +512,7 @@       <!-- FindCommentsBackq consumes shell comments till EOL or a backquote -->       <context attribute="Normal Text" lineEndContext="#pop" name="FindCommentsBackq">         <DetectChar attribute="Comment" context="CommentBackq" char="#" firstNonSpace="true"/>-        <RegExpr attribute="Normal Text" context="CommentBackq" String="[\s;](?=#)" />+        <RegExpr attribute="Normal Text" context="CommentBackq" String="&charbeforecomment;(?=#)" />       </context>       <context attribute="Comment" lineEndContext="#pop" name="CommentBackq">         <RegExpr attribute="Comment" context="#pop" String="[^`](?=`)" />@@ -567,13 +577,27 @@         <RegExpr attribute="OtherCommand" context="#stay" String="/&pathpart;*(?=([/);$`'&quot;]|$))" />         <RegExpr attribute="OtherCommand" context="CommandArgs" String="/&pathpart;*(?=([\s);$`'&quot;]|$))" />         <!-- This list is not complete. ie, ":" is missing but as it is in bash completition. -->-        <RegExpr attribute="OtherCommand" context="CommandArgs" String="&pathpart;*" />+        <RegExpr attribute="OtherCommand" context="CommandArgsNormal" String="&pathpart;*" />       </context>        <!-- CommandArgs matches the items after a command -->       <context attribute="Normal Text" lineEndContext="#pop" name="CommandArgs">-        <LineContinue />+        <!-- In command arguments, do not allow comments after escaped characters.+             This avoids highlighting comments within paths or other text. Ex: pathtext\ #no\ comment -->+        <!-- FindComments -->+        <RegExpr attribute="Control" context="#pop!Comment" String=";;?(?=#)" />+        <IncludeRules context="FindCommentsInCommand" />+        <IncludeRules context="FindMostWithoutComments" />+        <IncludeRules context="DefaultCommandArgs" />+      </context>+      <!-- CommandArgs but with normal comments -->+      <context attribute="Normal Text" lineEndContext="#pop" name="CommandArgsNormal">         <IncludeRules context="FindMost" />+        <IncludeRules context="DefaultCommandArgs" />+      </context>++      <context attribute="Normal Text" lineEndContext="#pop" name="DefaultCommandArgs">+        <LineContinue />         <RegExpr attribute="Keyword" context="#stay" String="\\$" />         <!-- handle keywords -->         <RegExpr attribute="Option" context="#stay" String="\.(?=\s)" />@@ -585,7 +609,7 @@         <RegExpr attribute="Redirection" context="ProcessSubst" String="[&lt;&gt;]\(" />         <!-- handle redirection -->         <RegExpr attribute="Redirection" context="#stay" String="([0-9]*(&gt;{1,2}|&lt;)(&amp;[0-9]+-?)?|&amp;&gt;|&gt;&amp;|[0-9]*&lt;&gt;)" />-        <!-- handle &, &&, | and || -->+        <!-- handle &, &&, |, ||, ; and ;; -->         <RegExpr attribute="Control" context="#pop" String="([|&amp;;])\1?" />         <RegExpr attribute="Normal Text" context="#stay" String="[a-zA-Z_]+-[A-Za-z0-9_-]*" />         <RegExpr attribute="Option" context="#stay" String="-?-[a-zA-Z_][A-Za-z0-9_-]*" />
xml/coffee.xml view
@@ -2,7 +2,7 @@ <!DOCTYPE language SYSTEM "language.dtd">  <language name="CoffeeScript"-          version="11"+          version="12"           kateversion="5.0"           section="Scripts"           extensions="Cakefile;*.coffee;*.coco;*.cson"@@ -240,58 +240,72 @@       </context>        <!-- Embedded Javascript (one backtick). -->+       <context name="Javascript" attribute="Normal" lineEndContext="#stay" noIndentationBasedFolding="1">         <DetectChar attribute="Javascript" context="#pop" char="`" endRegion="Javascript"/>         <!-- NOTE: This hides errors where a backtick is embedded in a JS string or a comment. -->         <IncludeRules context="Overwrite Javascript"/>         <IncludeRules context="Normal##JavaScript" includeAttrib="true"/>       </context>+       <!-- Allow template strings in JavaScript embedded code (with one backtick). -->-      <context name="Overwrite Javascript" attribute="Javascript" lineEndContext="#stay" noIndentationBasedFolding="1">+      <context name="Overwrite Javascript" attribute="Normal" lineEndContext="#stay" noIndentationBasedFolding="1">         <!-- JavaScript Template. -->-        <Detect2Chars attribute="JavaScript Template" context="Javascript Template" char="\" char1="`"/>-        <RegExpr attribute="Error" context="#stay" String="String\.raw(?=`)"/>-        <StringDetect attribute="JavaScript Template" context="Javascript RawTemplate" String="String.raw\`"/>+        <Detect2Chars attribute="JavaScript Template" context="Javascript Template" char="\" char1="`" beginRegion="Template"/>+        <RegExpr context="Javascript StartRawTemplate" String="\b(String)\s*(\.)\s*(raw)\s*\\`" lookAhead="true"/>+        <!-- Tagged Template Literals -->+        <RegExpr attribute="JavaScript Function Name" context="#stay" String="[a-zA-Z_$[:^ascii:]][\w$[:^ascii:]]*(?=\s*\\`)" />+        <RegExpr attribute="Error" context="#stay" String="\bString\s*\.\s*raw(?=\s*`)" />+        <RegExpr attribute="Normal" context="#stay" String="[a-zA-Z_$[:^ascii:]][\w$[:^ascii:]]*(?=\s*`)" />         <!-- Contexts of javascript.xml. -->-        <DetectChar context="JavaScript Object" char="{" beginRegion="Brace" />+        <DetectChar attribute="Normal" context="JavaScript Object" char="{" beginRegion="Brace" />       </context>       <context name="JavaScript Object" attribute="Normal" lineEndContext="#stay" noIndentationBasedFolding="1">         <DetectChar context="#pop" char="`" lookAhead="true"/>-        <DetectChar context="#pop" char="}" endRegion="Brace"/>+        <DetectChar attribute="Normal" context="#pop" char="}" endRegion="Brace"/>         <IncludeRules context="Overwrite Javascript"/>         <IncludeRules context="Object##JavaScript"/>       </context>+       <context name="Javascript Template" attribute="JavaScript Template" lineEndContext="#stay" noIndentationBasedFolding="1">         <RegExpr attribute="Escape" context="#stay" String="\\\\\\`"/>-        <Detect2Chars attribute="JavaScript Template" context="RegExpAfterString##JavaScript" char="\" char1="`"/> <!-- End template. -->+        <Detect2Chars attribute="JavaScript Template" context="RegExpAfterString##JavaScript" char="\" char1="`" endRegion="Template"/> <!-- End template. -->         <DetectChar context="#pop" char="`" lookAhead="true"/>         <Detect2Chars attribute="JavaScript Substitution" context="Javascript Substitution" char="$" char1="{"/>         <IncludeRules context="Template##JavaScript"/>         <RegExpr attribute="Error" context="#stay" String="(?:[^\\\s](?=`)|\S(?=\s+`))"/>       </context>-      <context name="Javascript RawTemplate" attribute="JavaScript Template" lineEndContext="#stay">-        <Detect2Chars attribute="JavaScript Template" context="#stay" char="\" char1="\"/>-        <Detect2Chars attribute="JavaScript Template" context="RegExpAfterString##JavaScript" char="\" char1="`"/> <!-- End template. -->-        <DetectChar context="#pop" char="`" lookAhead="true"/>-        <RegExpr attribute="Error" context="#stay" String="(?:[^\\\s](?=`)|\S(?=\s+`))"/>-      </context>       <context name="Javascript Substitution" attribute="Normal" lineEndContext="#stay" noIndentationBasedFolding="1">         <DetectChar attribute="Javascript" context="#pop" char="`" lookAhead="true"/>-        <DetectChar context="#pop" attribute="JavaScript Substitution" char="}"/>+        <DetectChar attribute="JavaScript Substitution" context="#pop" char="}"/>         <IncludeRules context="Overwrite Javascript"/>         <IncludeRules context="Substitution##JavaScript"/>       </context> +      <context name="Javascript StartRawTemplate" attribute="JavaScript Template" lineEndContext="#pop" noIndentationBasedFolding="1">+        <DetectSpaces />+        <Detect2Chars attribute="JavaScript Template" context="#pop!Javascript RawTemplate" char="\" char1="`" beginRegion="Template"/>+        <StringDetect attribute="JavaScript Built-in Objects" context="#stay" String="%1" dynamic="true"/>+        <DetectChar attribute="JavaScript Symbol" context="#stay" char="2" dynamic="true"/>+        <StringDetect attribute="JavaScript Function Name" context="#stay" String="%3" dynamic="true"/>+      </context>+      <context name="Javascript RawTemplate" attribute="JavaScript Template" lineEndContext="#stay" noIndentationBasedFolding="1">+        <Detect2Chars attribute="JavaScript Template" context="#stay" char="\" char1="\"/>+        <Detect2Chars attribute="JavaScript Template" context="RegExpAfterString##JavaScript" char="\" char1="`" endRegion="Template"/> <!-- End template. -->+        <DetectChar context="#pop" char="`" lookAhead="true"/>+        <RegExpr attribute="Error" context="#stay" String="(?:[^\\\s](?=`)|\S(?=\s+`))"/>+      </context>+       <!-- Embedded Javascript (triple backticks). -->       <context name="Javascript Triple Backticks" attribute="Normal" lineEndContext="#stay" noIndentationBasedFolding="1">         <StringDetect attribute="Javascript" context="#pop" String="```" endRegion="Javascript TB"/>-        <DetectChar context="JavaScript-TB Object" char="{" beginRegion="Brace"/>+        <DetectChar attribute="Normal" context="JavaScript-TB Object" char="{" beginRegion="Brace"/>         <IncludeRules context="Normal##JavaScript" includeAttrib="true"/>       </context>       <context name="JavaScript-TB Object" attribute="Normal" lineEndContext="#stay" noIndentationBasedFolding="1">         <StringDetect attribute="Javascript" context="#pop" String="```" lookAhead="true"/>-        <DetectChar context="#pop" char="}" endRegion="Brace"/>-        <DetectChar context="JavaScript-TB Object" char="{" beginRegion="Brace"/>+        <DetectChar attribute="Normal" context="#pop" char="}" endRegion="Brace"/>+        <DetectChar attribute="Normal" context="JavaScript-TB Object" char="{" beginRegion="Brace"/>         <IncludeRules context="Object##JavaScript"/>       </context>     </contexts>@@ -325,6 +339,9 @@        <itemData name="JavaScript Template" defStyleNum="dsVerbatimString"/>       <itemData name="JavaScript Substitution" defStyleNum="dsSpecialChar" spellChecking="false"/>+      <itemData name="JavaScript Function Name" defStyleNum="dsFunction" spellChecking="false"/>+      <itemData name="JavaScript Built-in Objects" defStyleNum="dsBuiltIn" spellChecking="false" />+      <itemData name="JavaScript Symbol" defStyleNum="dsOperator" spellChecking="false" />     </itemDatas>   </highlighting>   <!-- Global settings. -->
xml/javascript-react.xml view
@@ -21,7 +21,7 @@        This file is part of the KDE's KSyntaxHighlighting framework. -      Copyright 2018-2019 Nibaldo González S. (nibgonz@gmail.com)+      Copyright 2018-2020 Nibaldo González S. (nibgonz@gmail.com)        This Source Code Form is subject to the terms of the MIT License.       If a copy of the license was not distributed with this file,@@ -38,6 +38,7 @@     available at: https://github.com/Microsoft/TypeScript-TmLanguage      Change log:+     * v9 [2020-06-03]: Add folding in templates.      * v8 [2019-11-21]: Tag detection is more stricter.      * v7 [2019-11-19]: Rename definition "JavaScript React" to "JavaScript React (JSX)".      * v5 [2019-02-20]: Don't highlight tags within declarations of@@ -52,7 +53,7 @@      * v1 [2018-06-20]: Initial version --> -<language name="JavaScript React (JSX)" version="8" kateversion="5.0" section="Scripts" indenter="cstyle"+<language name="JavaScript React (JSX)" version="9" kateversion="5.0" section="Scripts" indenter="cstyle"           priority="9" extensions="*.jsx" mimetype="text/jsx;text/x-jsx;application/jsx;application/x-jsx;"           author="Nibaldo González (nibgonz@gmail.com)" license="MIT"> @@ -75,7 +76,7 @@ 		<!-- Overwrite rules of 'javascript.xml'. These rules send to contexts 		     that contain: <IncludeRules context="Normal"/> in the JavaScript XML file. --> 		<context name="OverwriteJavaScript" attribute="Normal Text" lineEndContext="#stay">-			<DetectChar context="Template" attribute="Template" char="`" />+			<DetectChar context="Template" attribute="Template" char="`" beginRegion="Template" /> 			<DetectChar attribute="Normal Text" context="#stay" char="[" beginRegion="List" /> 			<DetectChar attribute="Normal Text" context="NoRegExp##JavaScript" char="]" endRegion="List" /> 			<!-- NOTE: The "{" character sends to the "Object" context (see the "React" context) -->@@ -92,7 +93,7 @@ 			<IncludeRules context="ConditionalExpression##JavaScript" /> 		</context> 		<context name="Template" attribute="Template" lineEndContext="#stay">-			<DetectChar context="RegExpAfterString##JavaScript" attribute="Template" char="`" />+			<DetectChar context="RegExpAfterString##JavaScript" attribute="Template" char="`" endRegion="Template" /> 			<!-- Find tags and send to the "Substitution" context --> 			<Detect2Chars context="Substitution-BeforeTag" attribute="Substitution" char="$" char1="{" /> 			<IncludeRules context="Template##JavaScript" />
xml/javascript.xml view
@@ -9,12 +9,15 @@   Minor changes: Joseph Wenninger <jowenn@kde.org>   Full JavaScript 1.0 support by Whitehawk Stormchaser -  Last Update: Nov. 20, 2019 (Version 14)+  Last Update: Jun. 03, 2020 (Version 15) -  IMPORTANT: This syntax highlighting definition depends on-  JavaScript React (JSX), TypeScript and QML.+  IMPORTANT: This syntax highlighting definition depends on:+   * JavaScript React (JSX)+   * TypeScript+   * QML+   * CoffeeScript (embedded) -->-<language name="JavaScript" version="14" kateversion="5.0" section="Scripts" extensions="*.js;*.kwinscript;*.julius"+<language name="JavaScript" version="15" kateversion="5.0" section="Scripts" extensions="*.js;*.kwinscript;*.julius"           mimetype="text/x-javascript;application/x-javascript;application/javascript;text/javascript" indenter="cstyle"           author="Anders Lund (anders@alweb.dk), Joseph Wenninger (jowenn@kde.org), Whitehawk Stormchaser (zerokode@gmx.net)" license=""> @@ -977,6 +980,7 @@       <item>index</item>       <item>innerHeight</item>       <item>innerWidth</item>+      <item>innerHTML</item>       <item>input</item>       <item>isMap</item>       <item>label</item>@@ -1748,11 +1752,13 @@        <!-- Find Objects Member and Functions -->       <context attribute="Normal Text" lineEndContext="#stay" name="FindObjectMembersAndFunctions">+        <!-- Tagged Template Literals -->+        <RegExpr attribute="Function Name" context="#stay" String="&identifier;(?=\s*`)" />         <!-- The order of these rules is important: 1) Functions. 2) Constants. 3) Objects. -->         <RegExpr attribute="Function Name" context="Function" String="(&identifier;)(?=\s*\()" lookAhead="true" />         <IncludeRules context="BuiltInConstants" />         <RegExpr attribute="Objects" context="Object Member" String="&identifier;(?=\s*\.)" />-        <DetectChar attribute="Symbol" context="Object Member" char="." />+        <DetectChar attribute="Symbol" context="Object Member" char="." lookAhead="true" />       </context>       <context attribute="Normal Text" lineEndContext="#pop" name="Function">         <keyword attribute="Function (Built-in)" context="#pop" String="functions" />@@ -1770,11 +1776,14 @@       </context>       <!-- Used in common and built-in objects. -->       <context attribute="Normal Text" lineEndContext="#pop" name="DefaultMemberObject">+        <StringDetect attribute="Symbol" context="#pop" String="..." />         <DetectChar attribute="Symbol" context="#stay" char="." />          <!-- The order of these rules is important: 1) Functions. 2) Constants & Properties. 3) Obj. Members. -->         <!-- Function -->         <RegExpr attribute="Function Name" context="#pop" String="&identifier;(?=\s*\()" />+        <!-- Tagged Template Literals -->+        <RegExpr context="#pop" String="&identifier;\s*`" lookAhead="true" />         <!-- Generic constants and properties -->         <keyword attribute="Object Property (Built-in)" context="#pop!NoRegExp" String="variable_property" />         <keyword attribute="Constant" context="#pop!NoRegExp" String="dom_constant" />@@ -1785,13 +1794,13 @@         <DetectSpaces />          <!-- Generic Functions -->-        <keyword context="#pop!NoRegExp" attribute="Function Name" String="functions" />+        <keyword attribute="Function Name" context="#pop!NoRegExp" String="functions" />       </context>        <!-- Strings -->       <context attribute="Normal Text" lineEndContext="#stay" name="FindStrings">-        <DetectChar attribute="Template" context="Template" char="`" />-        <StringDetect attribute="Template" context="RawTemplate" String="String.raw`" />+        <DetectChar attribute="Template" context="Template" char="`" beginRegion="Template" />+        <RegExpr attribute="Template" context="StartRawTemplate" String="\b(String)\s*(\.)\s*(raw)\s*`" lookAhead="true" />          <DetectChar attribute="String" context="String" char="&quot;" />         <DetectChar attribute="String" context="String SQ" char="'" />@@ -1823,18 +1832,26 @@       <context attribute="Template" lineEndContext="#stay" name="Template">         <IncludeRules context="Escape" />         <Detect2Chars attribute="Substitution" context="Substitution" char="$" char1="{" />-        <DetectChar attribute="Template" context="RegExpAfterString" char="`" />+        <DetectChar attribute="Template" context="RegExpAfterString" char="`" endRegion="Template" />       </context>-      <context attribute="Template" lineEndContext="#stay" name="RawTemplate">-        <DetectChar attribute="Template" context="RegExpAfterString" char="`" />+      <context attribute="Normal Text" lineEndContext="#stay" name="Substitution">+        <DetectChar attribute="Substitution" char="}" context="#pop" />+        <IncludeRules context="Normal" />       </context>-      <context name="Substitution" attribute="Normal Text" lineEndContext="#stay">-        <DetectChar attribute="Substitution" char="}" context="#pop"/>-        <IncludeRules context="Normal"/>++      <context attribute="Normal Text" lineEndContext="#pop" name="StartRawTemplate">+        <DetectSpaces />+        <DetectChar attribute="Template" context="#pop!RawTemplate" char="`" beginRegion="Template" />+        <StringDetect attribute="Built-in Objects" context="#stay" String="%1" dynamic="true" />+        <DetectChar attribute="Symbol" context="#stay" char="2" dynamic="true" />+        <StringDetect attribute="Function Name" context="#stay" String="%3" dynamic="true" />       </context>+      <context attribute="Template" lineEndContext="#stay" name="RawTemplate">+        <DetectChar attribute="Template" context="RegExpAfterString" char="`" endRegion="Template" />+      </context>        <!-- Comments -->-      <context name="FindComments" attribute="Normal Text" lineEndContext="#stay">+      <context attribute="Normal Text" lineEndContext="#stay" name="FindComments">         <StringDetect attribute="Region Marker" context="region_marker" String="//BEGIN" beginRegion="Region1" />         <StringDetect attribute="Region Marker" context="region_marker" String="//END" endRegion="Region1" /> @@ -1853,7 +1870,7 @@         <IncludeRules context="##Alerts" />         <IncludeRules context="##Modelines" />       </context>-      <context name="region_marker" attribute="Region Marker" lineEndContext="#pop" />+      <context attribute="Region Marker" lineEndContext="#pop" name="region_marker" />        <!-- Regular Expressions -->       <context attribute="Regular Expression" lineEndContext="#stay" name="Regular Expression">
xml/latex.xml view
@@ -3,9 +3,8 @@ [     <!ENTITY bullet "&#xd7;">     <!ENTITY envname "[a-zA-Z]+\*?">-    <!ENTITY regionmarker "&#037;\s*(?:BEGIN|END)"> ]>-<language name="LaTeX" version="13" section="Markup" kateversion="5.0" priority="10" extensions="*.tex;*.ltx;*.dtx;*.sty;*.cls;*.bbx;*.cbx;*.lbx;*.tikz;*.pgf" mimetype="text/x-tex" casesensitive="1" author="Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)+Holger Danielsson (holger.danielsson@versanet.de)+Michel Ludwig (michel.ludwig@kdemail.net)+Thomas Braun (thomas.braun@virtuell-zuhause.de)" license="LGPL" >+<language name="LaTeX" version="14" section="Markup" kateversion="5.0" priority="10" extensions="*.tex;*.ltx;*.dtx;*.sty;*.cls;*.bbx;*.cbx;*.lbx;*.tikz;*.pgf" mimetype="text/x-tex" casesensitive="1" author="Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)+Holger Danielsson (holger.danielsson@versanet.de)+Michel Ludwig (michel.ludwig@kdemail.net)+Thomas Braun (thomas.braun@virtuell-zuhause.de)" license="LGPL" >   <highlighting>     <!-- NOTE: Keywords of kind "\something" do not need a delimiter before "\".          Using a DetectChar rule with lookAhead to detect "\" at the beginning@@ -284,14 +283,13 @@         <DetectChar char="\" attribute="Normal Text" context="LatexMacro" lookAhead="true"/>         <DetectChar char="$" attribute="Math" context="MathModeTex"/>         <RegExpr String="&lt;&lt;.*&gt;&gt;=" attribute="Normal Text" context="NoWeb" column="0"/>-        <RegExpr String="&regionmarker;" attribute="Region Marker" context="RegionComment" firstNonSpace="true"/>-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>         <DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>       </context>        <context name="LatexMacro" attribute="Normal Text" lineEndContext="#pop">         <keyword String="beginEnv" attribute="Structure" context="#pop!FindBeginEnvironment" beginRegion="block"/>-        <keyword String="endEnv" attribute="Structure" context="#pop!FindEndEnvironment" endRegion="block"/>+        <keyword String="endEnv" attribute="Structure" context="#pop!FindEndEnvironment"/>         <keyword String="Label" attribute="Structure" context="#pop!Label"/>         <keyword String="macroFancyLabel" attribute="Builtin Macro" context="#pop!FancyLabel"/>         <keyword String="FancyLabel" attribute="Structure" context="#pop!FancyLabel"/>@@ -318,7 +316,7 @@         <RangeDetect char="[" char1="]" attribute="Normal Text" context="#stay"/>         <DetectChar char="{" attribute="Normal Text" context="SectioningInside"/>         <DetectChar char="}" attribute="Normal Text" context="#pop"/>-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>       </context>       <context name="SectioningInside" attribute="Sectioning Text" lineEndContext="#stay">         <DetectChar char="{" attribute="Normal Text" context="SectioningInside"/>@@ -326,12 +324,12 @@         <Detect2Chars char="\" char1="(" attribute="Sectioning Math" context="SectioningMathMode" />         <DetectChar char="\" attribute="Sectioning Macro" context="SectioningContrSeq"/>         <DetectChar char="$" attribute="Sectioning Math" context="SectioningMathMode" />-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>         <DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>       </context>       <context name="SectioningContrSeq" attribute="Macro" lineEndContext="#pop">         <DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>-        <RegExpr String="[a-zA-Z]+(\+?|\*{0,3})|." attribute="Sectioning Macro" context="#pop" />+        <RegExpr String="[a-zA-Z]+(?:\+?|\*{0,3})|." attribute="Sectioning Macro" context="#pop" />       </context>       <context name="SectioningMathMode" attribute="Sectioning Math" lineEndContext="#stay">         <Detect2Chars char="$" char1="$" attribute="Error" context="#stay" />@@ -339,7 +337,7 @@         <Detect2Chars char="\" char1=")" attribute="Sectioning Math" context="#pop" />         <Detect2Chars char="\" char1="]" attribute="Error" context="#stay" />         <DetectChar char="\" attribute="Sectioning Macro Mathmode" context="SectioningMathContrSeq"/>-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>         <DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>       </context>       <context name="SectioningMathContrSeq" attribute="Sectioning Macro Mathmode" lineEndContext="#pop">@@ -353,7 +351,7 @@         <RangeDetect char="[" char1="]" attribute="Normal Text" context="#stay"/>         <DetectChar char="{" attribute="Normal Text" context="FootnotingInside"/>         <DetectChar char="}" attribute="Normal Text" context="#pop"/>-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>       </context>       <context name="FootnotingInside" attribute="Normal Text" lineEndContext="#stay">         <DetectChar char="{" attribute="Normal Text" context="FootnotingInside"/>@@ -365,7 +363,7 @@       <context name="NewCommand" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">         <DetectSpaces/>         <DetectChar char="{" attribute="Normal Text" context="LabelParameter"/>-        <RegExpr String="(\[\d\](\[[^\]]*\])?)?\{" attribute="Normal Text" context="LabelParameter"/>+        <RegExpr String="(?:\[\d\](?:\[[^\]]*\])?)?\{" attribute="Normal Text" context="LabelParameter"/>         <DetectChar char="}" attribute="Error" context="#pop"/>       </context> @@ -381,7 +379,7 @@         <DetectChar char="{" attribute="Normal Text" context="CommandParameter"/>         <DetectChar char="}" attribute="Normal Text" context="#pop"/>         <RegExpr String="\\." attribute="Normal Text" context="#stay"/>-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>       </context>        <!-- LaTeX command in text mode -->@@ -390,7 +388,7 @@         <keyword String="Lstinline" attribute="Macro" context="Lstinline"/>         <keyword String="MintParam" attribute="Macro" context="MintParam"/>         <DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>-        <RegExpr String="[a-zA-Z@]+(\+?|\*{0,3})|." attribute="Macro" context="#pop" />+        <RegExpr String="[a-zA-Z@]+(?:\+?|\*{0,3})|." attribute="Macro" context="#pop" />       </context>        <!-- \mint command with parameter-->@@ -440,7 +438,7 @@         <Detect2Chars char="\" char1="(" attribute="Math" context="MathModeLatex"/>         <DetectChar char="\" attribute="Macro" context="ContrSeq"/>         <DetectChar char="$" attribute="Math" context="MathModeTex" />-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>         <DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>         <DetectChar char="]" attribute="Normal Text" context="#pop"/>       </context>@@ -464,7 +462,7 @@         <Detect2Chars char="\" char1="(" attribute="Math" context="MathModeLatex"/>         <DetectChar char="\" attribute="Macro" context="ContrSeq"/>         <DetectChar char="$" attribute="Math" context="MathModeTex" />-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>         <DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>         <DetectChar char="}" attribute="Normal Text" context="#pop"/>         <DetectChar char="{" attribute="Normal Text" context="FancyLabelParameter"/>@@ -479,7 +477,7 @@         <Detect2Chars char="\" char1="(" attribute="Math" context="MathModeLatex" />         <DetectChar char="\" attribute="Macro" context="ContrSeq"/>         <DetectChar char="$" attribute="Math" context="MathModeTex" />-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>         <DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>         <DetectChar char=")" attribute="Normal Text" context="#pop"/>       </context>@@ -495,7 +493,7 @@         <Detect2Chars char="\" char1="(" attribute="Math" context="MathModeLatex" />         <DetectChar char="\" attribute="Macro" context="ContrSeq"/>         <DetectChar char="$" attribute="Math" context="MathModeTex" />-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>         <DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>         <DetectChar char="}" attribute="Normal Text" context="#pop"/>         <DetectChar char="{" attribute="Normal Text" context="SpecialCommandParameterOption"/>@@ -629,17 +627,17 @@       <context name="ListingsEnvParam" attribute="Normal Text" lineEndContext="#pop!UnknownHighlighting" fallthrough="true" fallthroughContext="#pop!UnknownHighlighting">         <DetectSpaces/>         <DetectChar char="[" attribute="Normal Text" context="#pop!ListingsEnvParamInside"/>-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>       </context>       <context name="ListingsEnvParamInside" attribute="Normal Text" lineEndContext="#stay">         <DetectIdentifier/>         <RegExpr String="\s*language\s*=\s*(?=[^],])" attribute="Normal Text" context="HighlightingSelector"/>         <DetectChar char="]" attribute="Normal Text" context="ListingsEnvParamEnd"/>-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>       </context>       <context name="ListingsEnvParamEnd" attribute="Normal Text" lineEndContext="#pop#pop!UnknownHighlighting" fallthrough="true" fallthroughContext="#pop#pop!UnknownHighlighting">         <DetectSpaces/>-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>       </context>        <!-- environment type 5: minted environment with optional and HL switching -->@@ -651,19 +649,19 @@         <DetectSpaces/>         <DetectChar char="[" attribute="Normal Text" context="#pop!MintedEnvParamInside"/>         <DetectChar char="{" attribute="Normal Text" context="HighlightingSelector"/>-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>       </context>       <context name="MintedEnvParamInside" attribute="Normal Text" lineEndContext="#stay">         <DetectSpaces/>         <DetectIdentifier/>         <DetectChar char="]" attribute="Normal Text" context="#pop!MintedEnvLang"/>-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>         <RegExpr String="\\&envname;" attribute="Macro" context="#stay"/>       </context>       <context name="MintedEnvLang" attribute="Normal Text" lineEndContext="#stay">         <DetectSpaces/>         <DetectChar char="{" attribute="Normal Text" context="HighlightingSelector"/>-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>       </context>        <!-- parse verbatim text for lstinline and minted -->@@ -671,7 +669,7 @@         <DetectSpaces/>         <DetectIdentifier/>         <DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>-        <RegExpr String="\\end(?=\s*\{(lstlisting|minted)\*?\})" attribute="Structure" context="UnknownHighlightingEnd"/>+        <RegExpr String="\\end(?=\s*\{(?:lstlisting|minted)\*?\})" attribute="Structure" context="UnknownHighlightingEnd"/>       </context>       <context name="UnknownHighlightingEnd" attribute="Environment" lineEndContext="#stay">         <DetectSpaces/>@@ -691,7 +689,7 @@       </context>        <context name="HighlightingCommon" attribute="Normal Text" lineEndContext="#stay">-        <RegExpr String="\\end\s*\{(lstlisting|minted)\*?\}" attribute="Structure" lookAhead="true" context="#pop#pop#pop#pop#pop#pop"/>+        <RegExpr String="\\end\s*\{(?:lstlisting|minted)\*?\}" attribute="Structure" lookAhead="true" context="#pop#pop#pop#pop#pop#pop"/>       </context>        <context name="HighlightingBeginC++" attribute="Normal Text" lineEndContext="#stay">@@ -773,13 +771,12 @@         <DetectIdentifier/>         <DetectChar char="\" attribute="Math" context="BackslashMathModeEnv" lookAhead="true"/>         <DetectChar char="$" attribute="Error" context="#stay"/>-        <RegExpr String="&regionmarker;" attribute="Region Marker" context="RegionComment" firstNonSpace="true"/>-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>         <DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>       </context>       <context name="BackslashMathModeEnv" attribute="Math" lineEndContext="#pop">         <keyword String="beginEnv" attribute="Structure" context="#pop!FindBeginEnvironmentInMathMode" beginRegion="block"/>-        <keyword String="endEnv" attribute="Structure" context="#pop!MathFindEnd" endRegion="block"/>+        <keyword String="endEnv" attribute="Structure" context="#pop!MathFindEnd"/>         <keyword String="MathModeText" attribute="Macro Mathmode" context="#pop!MathModeText"/>         <Detect2Chars char="\" char1="(" attribute="Error" context="#pop"/>         <Detect2Chars char="\" char1=")" attribute="Error" context="#pop"/>@@ -804,7 +801,7 @@         <keyword String="TabEnv" attribute="Environment" context="TabEnv"/>         <DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>         <!-- keywords in MathEnvParam and MathEnv. Do not use keyword to avoid autocomplete -->-        <RegExpr String="(equation|IEEEeqnarray(box)?|([BVvbp]|small)matrix|(fl)?align|x{0,2}alignat|cases|displaymath|gather|math|multline|(sub)?eqnarray)(?=[^a-zA-Z]|$)\*?" attribute="Error" context="#pop"/>+        <RegExpr String="(?:equation|IEEEeqnarray(?:box)?|(?:[BVvbp]|small)matrix|(?:fl)?align|x{0,2}alignat|cases|displaymath|gather|math|multline|(?:sub)?eqnarray)(?=[^a-zA-Z]|$)\*?" attribute="Error" context="#pop"/>         <RegExpr String="&envname;" attribute="Environment" context="LatexEnv"/>         <RegExpr String="." attribute="Error" context="#pop"/>       </context>@@ -899,13 +896,12 @@         <DetectSpaces/>         <DetectIdentifier/>         <DetectChar char="\" attribute="Math" context="BackslashMathModeCommon" lookAhead="true"/>-        <RegExpr String="&regionmarker;" attribute="Region Marker" context="RegionComment" firstNonSpace="true"/>-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>         <DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>       </context>       <context name="BackslashMathModeCommon" attribute="Math" lineEndContext="#pop">         <keyword String="beginEnv" attribute="Structure" context="#pop!MathEnvironment" beginRegion="block"/>-        <keyword String="endEnv" attribute="Structure" context="#pop!MathEnvironmentEnd" endRegion="block"/>+        <keyword String="endEnv" attribute="Structure" context="#pop!MathEnvironmentEnd"/>         <keyword String="MathModeText" attribute="Macro Mathmode" context="#pop!MathModeText" />         <DetectChar char="\" attribute="Macro Mathmode" context="#pop!MathContrSeq"/>       </context>@@ -925,7 +921,7 @@         <RegExpr String="." attribute="Error" context="#pop"/>       </context>       <context name="MathEnvironmentEndInside" attribute="Environment" lineEndContext="#stay">-        <DetectChar char="}" attribute="Normal Text" context="#pop#pop"/>+        <DetectChar char="}" attribute="Normal Text" context="#pop#pop" endRegion="block"/>         <WordDetect String="ensuremath" attribute="Environment" context="#pop!LatexEnvEnd"/>         <RegExpr String="&envname;" attribute="Environment" context="#stay"/>         <RegExpr String="[^}a-zA-Z]+|." attribute="Error" context="#pop#pop"/>@@ -951,7 +947,7 @@         <RangeDetect char="$" char1="$" attribute="Math" context="#stay"/>         <DetectChar char="{" attribute="Normal Text" context="MathModeTextInside" lookAhead="true"/>         <DetectChar char="}" attribute="Normal Text" context="#pop#pop"/>-        <DetectChar char="%" attribute="Comment" context="Comment"/>+        <IncludeRules context="FindComments"/>         <DetectChar char="\" attribute="Macro Mathmode" context="MathContrSeq"/>       </context> @@ -964,7 +960,12 @@         <DetectChar char="\" attribute="Comment" context="#pop"/>       </context> -     <!-- comment -->+      <!-- comment -->+      <context name="FindComments" attribute="Normal Text" lineEndContext="#stay">+        <RegExpr String="&#037;+\s*BEGIN\b" attribute="Region Marker" context="RegionComment" firstNonSpace="true" beginRegion="region-marker"/>+        <RegExpr String="&#037;+\s*END\b" attribute="Region Marker" context="RegionComment" firstNonSpace="true" endRegion="region-marker"/>+        <DetectChar char="%" attribute="Comment" context="Comment"/>+      </context>       <context name="RegionComment" attribute="Region Marker" lineEndContext="#pop"/>       <context name="Comment" attribute="Comment" lineEndContext="#pop">         <DetectSpaces/>
xml/sql-postgresql.xml view
@@ -3,7 +3,7 @@ <!-- PostgreSQL SQL, syntax definition based on sql.xml by Yury Lebedev      v5 fix comments by Gene Thomas <gene@genethomas.com>   -->-<language name="SQL (PostgreSQL)" version="8" kateversion="5.0" section="Database" extensions="*.sql;*.SQL;*.ddl;*.DDL" mimetype="text/x-sql" casesensitive="0" author="Shane Wright (me@shanewright.co.uk)" license="">+<language name="SQL (PostgreSQL)" version="9" kateversion="5.0" section="Database" extensions="*.sql;*.SQL;*.ddl;*.DDL" mimetype="text/x-sql" casesensitive="0" author="Shane Wright (me@shanewright.co.uk)" license="">   <highlighting>     <list name="controlFlow">       <item>BEGIN</item>@@ -1007,7 +1007,7 @@         <Float attribute="Float" context="#stay"/>         <Int attribute="Decimal" context="#stay"/>         <DetectChar attribute="String" context="String" char="'"/>-        <DetectChar attribute="Comment" context="Identifier" char="&quot;"/>+        <DetectChar attribute="Identifier" context="Identifier" char="&quot;"/>         <AnyChar attribute="Symbol" context="#stay" String=":&#38;"/>         <RegExpr attribute="Preprocessor" context="Preprocessor" String="@@?[^@ \t\r\n]" column="0"/>         <RegExpr attribute="Operator" context="MultiLineString" String="\$([^\$\n\r]*)\$"/>
xml/typescript.xml view
@@ -42,6 +42,8 @@       Attributes: path, types, no-default-lib, name      Change log:+     * v11 [2020-06-03]: Improve tagged template literals.+     * v10 [2020-04-13]: Add the 'awaited' type operator.      * v9 [2020-02-23]: Add private-named instance fields and type-only imports/exports.                         Improve conditional expressions.      * v8 [2019-12-12]: Add "bigint" primitive type.@@ -59,7 +61,7 @@ -->  <language name="TypeScript"-          version="9"+          version="11"           kateversion="5.53"           section="Scripts"           extensions="*.ts"@@ -112,7 +114,8 @@ 	<list name="types_operator_expression"> 		<item>keyof</item> 		<item>infer</item>-		<!-- Also: is, typeof -->+		<item>awaited</item>+		<!-- Also: typeof, readonly --> 	</list> 	<!-- Datatypes & Primitive Types --> 	<list name="types">@@ -283,6 +286,8 @@  			<!-- Functions: function(...) and function<...>(...) --> 			<RegExpr context="Function" attribute="Function Name" String="(&identifier;)&functionSuffix;" lookAhead="true" />+			<!-- Tagged Template Literals -->+			<RegExpr context="#stay" attribute="Function Name" String="&identifier;(?=\s*`)" />  			<!-- Symbols & Operators --> 			<!-- NOTE: - The brackets {}()[] are highlighted as Normal Text.@@ -391,13 +396,13 @@  		<!-- Strings --> 		<context name="FindStrings" attribute="Normal Text" lineEndContext="#stay">-			<DetectChar context="Template" attribute="Template" char="`" />+			<DetectChar context="Template" attribute="Template" char="`" beginRegion="Template" /> 			<IncludeRules context="FindStrings##JavaScript" /> 		</context> 		<context name="Template" attribute="Template" lineEndContext="#stay"> 			<IncludeRules context="Escape##JavaScript" /> 			<Detect2Chars context="Substitution" attribute="Substitution" char="$" char1="{" />-			<DetectChar context="RegExpAfterString##JavaScript" attribute="Template" char="`" />+			<DetectChar context="RegExpAfterString##JavaScript" attribute="Template" char="`" endRegion="Template" /> 		</context> 		<context name="Substitution" attribute="Normal Text" lineEndContext="#stay"> 			<DetectChar context="#pop" attribute="Substitution" char="}" />@@ -564,6 +569,8 @@ 			<!-- The order of these rules is important: 1) Functions. 2) Constants & Properties. 3) Obj. Members. --> 			<!-- function(...) and function<...>(...) --> 			<RegExpr context="#pop" attribute="Function Name" String="&identifier;&functionSuffix;" />+			<!-- Tagged Template Literals -->+			<RegExpr context="#pop" String="&identifier;\s*`" lookAhead="true" /> 			<!-- Generic constants and properties --> 			<keyword context="#pop!NoRegExp" attribute="Object Property (Built-in)" String="variable_property" /> 			<keyword context="#pop!NoRegExp" attribute="Constant" String="dom_constant" />