From dde16a0564a78c58939721d7127e412f648a72da Mon Sep 17 00:00:00 2001 From: Amadeus Demarzi Date: Tue, 26 Apr 2016 13:20:04 -0700 Subject: [PATCH] Fix class definitions with no name Fixes #401 --- syntax/javascript.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/javascript.vim b/syntax/javascript.vim index 3bdb39a6..4ca08ecd 100644 --- a/syntax/javascript.vim +++ b/syntax/javascript.vim @@ -215,7 +215,7 @@ syntax match jsArrowFuncArgs /([^()]*)\s*\(=>\)\@=/ skipempty skipwhite conta syntax keyword jsClassKeywords extends class contained syntax match jsClassNoise /\./ contained syntax keyword jsClassMethodDefinitions get set static contained nextgroup=jsFuncName skipwhite skipempty -syntax match jsClassDefinition /class [a-zA-Z_$][0-9a-zA-Z_$ \n.]*/ contains=jsClassKeywords,jsClassNoise nextgroup=jsClassBlock skipwhite skipempty +syntax match jsClassDefinition /class\%( [a-zA-Z_$][0-9a-zA-Z_$ \n.]*\)*/ contains=jsClassKeywords,jsClassNoise nextgroup=jsClassBlock skipwhite skipempty " Define the default highlighting. " For version 5.7 and earlier: only when not done already