diff options
Diffstat (limited to 'after/syntax/jsx.vim')
-rw-r--r-- | after/syntax/jsx.vim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/after/syntax/jsx.vim b/after/syntax/jsx.vim index 05987149..1785b4b2 100644 --- a/after/syntax/jsx.vim +++ b/after/syntax/jsx.vim @@ -36,6 +36,10 @@ endif " jsBlock take care of ending the region. syn region xmlString contained start=+{+ end=++ contains=jsBlock,javascriptBlock +" JSX comments inside XML tag should color as comment. Note the trivial end pattern; we let +" jsComment take care of ending the region. +syn region xmlString contained start=+//+ end=++ contains=jsComment + " JSX child blocks behave just like JSX attributes, except that (a) they are " syntactically distinct, and (b) they need the syn-extend argument, or else " nested XML end-tag patterns may end the outer jsxRegion. @@ -49,7 +53,7 @@ syn region jsxChild contained start=+{+ end=++ contains=jsBlock,javascriptBlock " and generic Flow type annotations (http://flowtype.org/). syn region jsxRegion \ contains=@Spell,@XMLSyntax,jsxRegion,jsxChild,jsBlock,javascriptBlock - \ start=+\%(<\|\w\)\@<!<\z([a-zA-Z][a-zA-Z0-9:\-.]*\>[:,]\@!\)\([^>]*>(\)\@!+ + \ start=+\%(<\|\w\)\@<!<\z([a-zA-Z_][a-zA-Z0-9:\-.]*\>[:,]\@!\)\([^>]*>(\)\@!+ \ skip=+<!--\_.\{-}-->+ \ end=+</\z1\_\s\{-}>+ \ end=+/>+ |