Skip to content

Commit 9356f4b

Browse files
committed
Support dot seperated namespace, like table.row
1 parent 951bc19 commit 9356f4b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

after/syntax/javascript.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ syntax region jsxTag
4545
" s~~~~e
4646
" A big start regexp borrowed from https://git.io/vDyxc
4747
syntax region jsxRegion
48-
\ start=+\(\((\|{\|}\|\[\|\]\|,\|&&\|||\|?\|:\|=\|=>\|\Wreturn\|^return\|\Wdefault\|^\|>\)\_s*\)\@<=<\z([_\$a-zA-Z][\$0-9a-zA-Z]*\)+
48+
\ start=+\(\((\|{\|}\|\[\|\]\|,\|&&\|||\|?\|:\|=\|=>\|\Wreturn\|^return\|\Wdefault\|^\|>\)\_s*\)\@<=<\z([_\$a-zA-Z]\(\.\?[\$0-9a-zA-Z]\+\)*\)+
4949
\ skip=+<!--\_.\{-}-->+
5050
\ end=+</\z1>+
5151
\ end=+/>+

sample.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ class Hoge extends React.Component {
3636
if (foo <= 300) {
3737
return <div style={{margin:0}}>
3838
<div>hello, world</div>
39+
<table.row hello="world">
40+
</table.row>
3941
</div>
4042
}
4143
}

0 commit comments

Comments
 (0)