Hello community,
here is the log from the commit of package ghc-skylighting-core for
openSUSE:Factory checked in at 2020-07-09 13:19:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-skylighting-core (Old)
and /work/SRC/openSUSE:Factory/.ghc-skylighting-core.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-skylighting-core"
Thu Jul 9 13:19:39 2020 rev:15 rq:819590 version:0.8.5
Changes:
--------
---
/work/SRC/openSUSE:Factory/ghc-skylighting-core/ghc-skylighting-core.changes
2020-06-19 17:18:22.955051369 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-skylighting-core.new.3060/ghc-skylighting-core.changes
2020-07-09 13:20:06.329409545 +0200
@@ -1,0 +2,19 @@
+Sun Jun 21 02:00:49 UTC 2020 - [email protected]
+
+- Update skylighting-core to version 0.8.5.
+ ## 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.
+
+-------------------------------------------------------------------
Old:
----
skylighting-core-0.8.4.tar.gz
New:
----
skylighting-core-0.8.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-skylighting-core.spec ++++++
--- /var/tmp/diff_new_pack.fLryAL/_old 2020-07-09 13:20:09.957421012 +0200
+++ /var/tmp/diff_new_pack.fLryAL/_new 2020-07-09 13:20:09.957421012 +0200
@@ -19,7 +19,7 @@
%global pkg_name skylighting-core
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.8.4
+Version: 0.8.5
Release: 0
Summary: Syntax highlighting library
License: BSD-3-Clause
++++++ skylighting-core-0.8.4.tar.gz -> skylighting-core-0.8.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/skylighting-core-0.8.4/changelog.md
new/skylighting-core-0.8.5/changelog.md
--- old/skylighting-core-0.8.4/changelog.md 2020-05-09 22:07:09.000000000
+0200
+++ new/skylighting-core-0.8.5/changelog.md 2020-06-20 00:29:20.000000000
+0200
@@ -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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/skylighting-core-0.8.4/skylighting-core.cabal
new/skylighting-core-0.8.5/skylighting-core.cabal
--- old/skylighting-core-0.8.4/skylighting-core.cabal 2020-05-09
22:06:08.000000000 +0200
+++ new/skylighting-core-0.8.5/skylighting-core.cabal 2020-06-20
00:20:02.000000000 +0200
@@ -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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/skylighting-core-0.8.4/src/Skylighting/Tokenizer.hs
new/skylighting-core-0.8.5/src/Skylighting/Tokenizer.hs
--- old/skylighting-core-0.8.4/src/Skylighting/Tokenizer.hs 2020-03-31
18:21:50.000000000 +0200
+++ new/skylighting-core-0.8.5/src/Skylighting/Tokenizer.hs 2020-06-19
23:16:54.000000000 +0200
@@ -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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/skylighting-core-0.8.4/test/expected/abc.javascript.native
new/skylighting-core-0.8.5/test/expected/abc.javascript.native
--- old/skylighting-core-0.8.4/test/expected/abc.javascript.native
2020-03-31 18:21:50.000000000 +0200
+++ new/skylighting-core-0.8.5/test/expected/abc.javascript.native
2020-06-20 00:25:40.000000000 +0200
@@ -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 , "))" )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/skylighting-core-0.8.4/test/expected/hk91.html.native
new/skylighting-core-0.8.5/test/expected/hk91.html.native
--- old/skylighting-core-0.8.4/test/expected/hk91.html.native 2020-03-31
18:21:50.000000000 +0200
+++ new/skylighting-core-0.8.5/test/expected/hk91.html.native 2020-06-19
23:16:54.000000000 +0200
@@ -66,7 +66,9 @@
, [ ( NormalTok , " " ) , ( KeywordTok , "</script>" ) ]
, []
, [ ( NormalTok , " " ) , ( KeywordTok , "<script>" ) ]
-, [ ( NormalTok , " $(" )
+, [ ( NormalTok , " " )
+ , ( FunctionTok , "$" )
+ , ( NormalTok , "(" )
, ( BuiltInTok , "document" )
, ( NormalTok , ")" )
, ( OperatorTok , "." )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/skylighting-core-0.8.4/test/test-skylighting.hs
new/skylighting-core-0.8.5/test/test-skylighting.hs
--- old/skylighting-core-0.8.4/test/test-skylighting.hs 2019-10-02
06:40:58.000000000 +0200
+++ new/skylighting-core-0.8.5/test/test-skylighting.hs 2020-06-19
23:16:54.000000000 +0200
@@ -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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/skylighting-core-0.8.4/xml/bash.xml
new/skylighting-core-0.8.5/xml/bash.xml
--- old/skylighting-core-0.8.4/xml/bash.xml 2020-04-01 18:02:49.000000000
+0200
+++ new/skylighting-core-0.8.5/xml/bash.xml 2020-06-20 00:21:30.000000000
+0200
@@ -7,8 +7,9 @@
<!ENTITY eos "(?=($|\s))"> <!-- eol or space
following -->
<!ENTITY noword "(?![\w$+-])"> <!-- no word, $, + or
- following -->
<!ENTITY pathpart "([\w_@.%*?+-]|\\ )"> <!-- 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 ([email protected])" 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 ([email protected])" license="LGPL">
<!-- (c) 2004 by Wilbert Berendsen ([email protected])
Changes by Matthew Woehlke ([email protected])
@@ -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,7 +486,13 @@
<!-- 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="(?<=&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" />
@@ -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;*(?=([/);$`'"]|$))" />
<RegExpr attribute="OtherCommand" context="CommandArgs"
String="/&pathpart;*(?=([\s);$`'"]|$))" />
<!-- 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="[<>]\(" />
<!-- handle redirection -->
<RegExpr attribute="Redirection" context="#stay"
String="([0-9]*(>{1,2}|<)(&[0-9]+-?)?|&>|>&|[0-9]*<>)"
/>
- <!-- handle &, &&, | and || -->
+ <!-- handle &, &&, |, ||, ; and ;; -->
<RegExpr attribute="Control" context="#pop" String="([|&;])\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_-]*" />
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/skylighting-core-0.8.4/xml/coffee.xml
new/skylighting-core-0.8.5/xml/coffee.xml
--- old/skylighting-core-0.8.4/xml/coffee.xml 2020-04-01 18:02:49.000000000
+0200
+++ new/skylighting-core-0.8.5/xml/coffee.xml 2020-06-20 00:21:30.000000000
+0200
@@ -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. -->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/skylighting-core-0.8.4/xml/javascript-react.xml
new/skylighting-core-0.8.5/xml/javascript-react.xml
--- old/skylighting-core-0.8.4/xml/javascript-react.xml 2020-04-01
18:02:49.000000000 +0200
+++ new/skylighting-core-0.8.5/xml/javascript-react.xml 2020-06-20
00:21:30.000000000 +0200
@@ -21,7 +21,7 @@
This file is part of the KDE's KSyntaxHighlighting framework.
- Copyright 2018-2019 Nibaldo González S. ([email protected])
+ Copyright 2018-2020 Nibaldo González S. ([email protected])
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 ([email protected])" 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" />
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/skylighting-core-0.8.4/xml/javascript.xml
new/skylighting-core-0.8.5/xml/javascript.xml
--- old/skylighting-core-0.8.4/xml/javascript.xml 2020-04-01
18:02:49.000000000 +0200
+++ new/skylighting-core-0.8.5/xml/javascript.xml 2020-06-20
00:21:30.000000000 +0200
@@ -9,12 +9,15 @@
Minor changes: Joseph Wenninger <[email protected]>
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 ([email protected]), Joseph Wenninger
([email protected]), Whitehawk Stormchaser ([email protected])" 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=""" />
<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 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 name="Substitution" attribute="Normal Text"
lineEndContext="#stay">
- <DetectChar attribute="Substitution" char="}" context="#pop"/>
- <IncludeRules context="Normal"/>
+ <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">
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/skylighting-core-0.8.4/xml/latex.xml
new/skylighting-core-0.8.5/xml/latex.xml
--- old/skylighting-core-0.8.4/xml/latex.xml 2020-04-01 18:02:49.000000000
+0200
+++ new/skylighting-core-0.8.5/xml/latex.xml 2020-06-20 00:21:30.000000000
+0200
@@ -3,9 +3,8 @@
[
<!ENTITY bullet "×">
<!ENTITY envname "[a-zA-Z]+\*?">
- <!ENTITY regionmarker "%\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
([email protected])+Holger Danielsson
([email protected])+Michel Ludwig
([email protected])+Thomas Braun ([email protected])"
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
([email protected])+Holger Danielsson
([email protected])+Michel Ludwig
([email protected])+Thomas Braun ([email protected])"
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="<<.*>>=" attribute="Normal Text"
context="NoWeb" column="0"/>
- <RegExpr String="®ionmarker;" attribute="Region Marker"
context="RegionComment" firstNonSpace="true"/>
- <DetectChar char="%" attribute="Comment" context="Comment"/>
+ <IncludeRules context="FindComments"/>
<DetectChar char="•" 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="•" attribute="Bullet" context="#stay"/>
</context>
<context name="SectioningContrSeq" attribute="Macro"
lineEndContext="#pop">
<DetectChar char="•" 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="•" 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="•" 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="•" 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="•" 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="•" 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="•" 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="•" 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="®ionmarker;" attribute="Region Marker"
context="RegionComment" firstNonSpace="true"/>
- <DetectChar char="%" attribute="Comment" context="Comment"/>
+ <IncludeRules context="FindComments"/>
<DetectChar char="•" 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="•" 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="®ionmarker;" attribute="Region Marker"
context="RegionComment" firstNonSpace="true"/>
- <DetectChar char="%" attribute="Comment" context="Comment"/>
+ <IncludeRules context="FindComments"/>
<DetectChar char="•" 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="%+\s*BEGIN\b" attribute="Region Marker"
context="RegionComment" firstNonSpace="true" beginRegion="region-marker"/>
+ <RegExpr String="%+\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/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/skylighting-core-0.8.4/xml/sql-postgresql.xml
new/skylighting-core-0.8.5/xml/sql-postgresql.xml
--- old/skylighting-core-0.8.4/xml/sql-postgresql.xml 2020-04-01
18:02:49.000000000 +0200
+++ new/skylighting-core-0.8.5/xml/sql-postgresql.xml 2020-06-20
00:21:30.000000000 +0200
@@ -3,7 +3,7 @@
<!-- PostgreSQL SQL, syntax definition based on sql.xml by Yury Lebedev
v5 fix comments by Gene Thomas <[email protected]>
-->
-<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 ([email protected])" 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 ([email protected])" 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="""/>
+ <DetectChar attribute="Identifier" context="Identifier" char="""/>
<AnyChar attribute="Symbol" context="#stay" String=":&"/>
<RegExpr attribute="Preprocessor" context="Preprocessor"
String="@@?[^@ \t\r\n]" column="0"/>
<RegExpr attribute="Operator" context="MultiLineString"
String="\$([^\$\n\r]*)\$"/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/skylighting-core-0.8.4/xml/typescript.xml
new/skylighting-core-0.8.5/xml/typescript.xml
--- old/skylighting-core-0.8.4/xml/typescript.xml 2020-04-01
18:02:49.000000000 +0200
+++ new/skylighting-core-0.8.5/xml/typescript.xml 2020-06-20
00:21:30.000000000 +0200
@@ -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" />