Skip to content

Commit 9d73c4a

Browse files
committed
Dro the semi-colon from the jsClassProperty detection regex so that the last line of every function (usually ending with a ;) isn't highlighted as a jsClassProperty
1 parent 81d91e2 commit 9d73c4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

syntax/javascript.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ syntax match jsClassNoise contained /\./
184184
syntax match jsClassFuncName contained /\<\K\k*\ze\s*[(<]/ skipwhite skipempty nextgroup=jsFuncArgs,jsFlowClassFunctionGroup
185185
syntax match jsClassMethodType contained /\<\%([gs]et\|static\)\ze\s\+\K\k*/ skipwhite skipempty nextgroup=jsAsyncKeyword,jsClassFuncName,jsClassProperty
186186
syntax region jsClassDefinition start=/\<class\>/ end=/\(\<extends\>\s\+\)\@<!{\@=/ contains=jsClassKeyword,jsExtendsKeyword,jsClassNoise,@jsExpression,jsFlowClassGroup skipwhite skipempty nextgroup=jsCommentClass,jsClassBlock,jsFlowClassGroup
187-
syntax match jsClassProperty contained /\<\K\k*\ze\s*[=;]/ skipwhite skipempty nextgroup=jsClassValue,jsFlowClassDef
187+
syntax match jsClassProperty contained /\<\K\k*\ze\s*[=]/ skipwhite skipempty nextgroup=jsClassValue,jsFlowClassDef
188188
syntax region jsClassValue contained start=/=/ end=/\_[;}]\@=/ contains=@jsExpression
189189
syntax region jsClassPropertyComputed contained matchgroup=jsBrackets start=/\[/ end=/]/ contains=@jsExpression skipwhite skipempty nextgroup=jsFuncArgs,jsClassValue extend
190190
syntax region jsClassStringKey contained start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1\|$+ contains=jsSpecial extend skipwhite skipempty nextgroup=jsFuncArgs

0 commit comments

Comments
 (0)