Skip to content

Commit f674cba

Browse files
authored
case label needs non whitespace- (#658)
can otherwise be a object key
1 parent f64dae7 commit f674cba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

indent/javascript.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ else
3838
endif
3939

4040
let s:line_pre = '^\s*\%(\%(\%(\/\*.\{-}\)\=\*\+\/\s*\)\=\)\@>'
41-
let s:expr_case = '\<\%(\%(case\>.\+\)\|default\)\s*:\C'
41+
let s:expr_case = '\<\%(\%(case\>\s*\S.\{-}\)\|default\)\s*:\C'
4242
" Regex of syntax group names that are or delimit string or are comments.
4343
let s:syng_strcom = '\%(s\%(tring\|pecial\)\|comment\|regex\|doc\|template\)'
4444

0 commit comments

Comments
 (0)