2727" <tag id="sample" />
2828" s~~~~~~~~~~~~~~~~~e
2929syntax region jsxTag
30- \ start = + <\([^ /!?<> = " ':]\+\)\@=+
30+ \ start = + <\([^/!?<> = " ':]\+\)\@=+
3131 \ skip = + </[^ /!?<> " ']\+>+
3232 \ end = + /\@ <!> +
3333 \ end = + \( />\)\@ = +
@@ -45,9 +45,9 @@ syntax region jsxTag
4545" s~~~~e
4646" A big start regexp borrowed from https://git.io/vDyxc
4747syntax region jsxRegion
48- \ start = + \(\( (\| {\| }\|\[\|\]\| ,\| && \| || \| ?\| :\| = \| = >\|\W return\| ^return \|\W default\| ^\| >\)\_ s* \)\@ <= <\z ([_\$ a - zA - Z]\(\.\? [\$ 0 - 9 a- zA - Z]\+\) * \) +
48+ \ start = + \(\( (\| {\| }\|\[\|\]\| ,\| && \| || \| ?\| :\| = \| = >\|\W return\| ^return \|\W default\| ^\| >\)\_ s* \)\@ <= <\_ s * \ z ([_\$ a - zA - Z]\(\.\? [\$ 0 - 9 a- zA - Z]\+\) * \) +
4949 \ skip = + <!--\_.\{-}--> +
50- \ end = + </\z1> +
50+ \ end = + </\_s*\ z1> +
5151 \ end = + />+
5252 \ fold
5353 \ contains= jsxRegion,jsxCloseString,jsxCloseTag,jsxTag,jsxComment,jsFuncBlock,
@@ -58,9 +58,9 @@ syntax region jsxRegion
5858" </tag>
5959" ~~~~~~
6060syntax match jsxCloseTag
61- \ + </[^ /!?<> " ']\+>+
61+ \ + </\_s*[^ /!?<> " ']\+>+
6262 \ contained
63- \ contains= jsxNamespace,jsxAttribPunct
63+ \ contains= jsxNamespace
6464
6565syntax match jsxCloseString
6666 \ + />+
@@ -76,20 +76,17 @@ syntax match jsxEntityPunct contained "[&.;]"
7676" <tag key={this.props.key}>
7777" ~~~
7878syntax match jsxTagName
79- \ + [ <]\@<=[^ /!?<>" ']\++
79+ \ + <\_s*\zs[^ /!?<>" ']\++
8080 \ contained
8181 \ display
8282
8383" <tag key={this.props.key}>
8484" ~~~
8585syntax match jsxAttrib
86- \ + [ - ' "<]\ @<!\< [a-zA-Z:_ ][-. 0-9a-zA-Z0-9:_ ]*\>\([ ' " ]\@!\|$\) +
86+ \ + \(\( <\_s*\)\ @<!\_s\)\@<=\< [a-zA-Z_ ][-0-9a-zA-Z_ ]*\>\(\_ s \+\|\_ s * [ = />] \)\@ = +
8787 \ contained
88- \ contains= jsxAttribPunct,jsxAttribHook
8988 \ display
9089
91- syntax match jsxAttribPunct + [:.]+ contained display
92-
9390" <tag id="sample">
9491" ~
9592" syntax match jsxEqual +=+ display
0 commit comments