Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/pug.xml
Show All 11 Lines | |||||
12 | 12 | | |||
13 | Changelog | 13 | Changelog | ||
14 | 14 | | |||
15 | Version 1 - Guo Yunhe guoyunhebrave@gmail.com - 2017-04-14 | 15 | Version 1 - Guo Yunhe guoyunhebrave@gmail.com - 2017-04-14 | ||
16 | - Basic Pug/Jade syntax support | 16 | - Basic Pug/Jade syntax support | ||
17 | - Do NOT support multi-line comment or text block | 17 | - Do NOT support multi-line comment or text block | ||
18 | 18 | | |||
19 | --> | 19 | --> | ||
20 | <language name="Pug" version="4" kateversion="5.0" section="Markup" extensions="*.pug;*.jade" mimetype="" priority="10" author="Guo Yunhe (guoyunhebrave@gmail.com)" license="LGPL"> | 20 | <language name="Pug" version="5" kateversion="5.0" section="Markup" extensions="*.pug;*.jade" mimetype="" priority="10" author="Guo Yunhe (guoyunhebrave@gmail.com)" license="LGPL"> | ||
21 | <highlighting> | 21 | <highlighting> | ||
22 | <list name="controlflow"> | 22 | <list name="controlflow"> | ||
23 | <item>case</item> | 23 | <item>case</item> | ||
24 | <item>when</item> | 24 | <item>when</item> | ||
25 | <item>default</item> | 25 | <item>default</item> | ||
26 | <item>if</item> | 26 | <item>if</item> | ||
27 | <item>unless</item> | 27 | <item>unless</item> | ||
28 | <item>else</item> | 28 | <item>else</item> | ||
29 | <item>each</item> | 29 | <item>each</item> | ||
30 | <item>while</item> | 30 | <item>while</item> | ||
31 | </list> | 31 | </list> | ||
32 | <contexts> | 32 | <contexts> | ||
33 | <context name="Start" attribute="Normal Text" lineEndContext="#stay"> | 33 | <context name="Start" attribute="Normal Text" lineEndContext="#stay"> | ||
34 | <Detect2Chars attribute="Comment" context="Comment" char="/" char1="/"/> | 34 | <Detect2Chars attribute="Comment" context="Comment" char="/" char1="/"/> | ||
35 | <StringDetect attribute="Doctype" context="#stay" String="doctype" insensitive="true"/> | 35 | <StringDetect attribute="Doctype" context="#stay" String="doctype" insensitive="true"/> | ||
36 | <RegExpr attribute="ControlFlow" context="JavaScript" String="\belse if\b" firstNonSpace="true"/> | 36 | <RegExpr attribute="ControlFlow" context="JavaScript" String="\belse\s+if\b" firstNonSpace="true"/> | ||
37 | <keyword attribute="ControlFlow" context="JavaScript" String="controlflow" firstNonSpace="true"/> | 37 | <keyword attribute="ControlFlow" context="JavaScript" String="controlflow" firstNonSpace="true"/> | ||
38 | <DetectIdentifier attribute="Normal Text" context="Element" firstNonSpace="true" lookAhead="true"/> | 38 | <DetectIdentifier attribute="Normal Text" context="Element" firstNonSpace="true" lookAhead="true"/> | ||
39 | <DetectChar attribute="Normal Text" context="Element" char="#" firstNonSpace="true" lookAhead="true"/> | 39 | <DetectChar attribute="Normal Text" context="Element" char="#" firstNonSpace="true" lookAhead="true"/> | ||
40 | <DetectChar attribute="Normal Text" context="Element" char="." firstNonSpace="true" lookAhead="true"/> | 40 | <DetectChar attribute="Normal Text" context="Element" char="." firstNonSpace="true" lookAhead="true"/> | ||
41 | <DetectChar attribute="Normal Text" context="JavaScript" char="-" firstNonSpace="true"/> | 41 | <DetectChar attribute="Normal Text" context="JavaScript" char="-" firstNonSpace="true"/> | ||
42 | <DetectChar attribute="Normal Text" context="#stay" char="|" firstNonSpace="true"/> | 42 | <DetectChar attribute="Normal Text" context="#stay" char="|" firstNonSpace="true"/> | ||
43 | </context> | 43 | </context> | ||
44 | <context name="FindInterpolation" attribute="Normal Text" lineEndContext="#stay"> | 44 | <context name="FindInterpolation" attribute="Normal Text" lineEndContext="#stay"> | ||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |