Skip to content

Commit cb52fbc

Browse files
author
Darrick Wiebe
committed
Allow those one line scopes to be on one line and terminated with ;
1 parent 6a1bb6b commit cb52fbc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

indent/javascript.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ let s:continuation_regex = '\%([\\*+/.:]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)' .
5555
" TODO: this needs to deal with if ...: and so on
5656
let s:msl_regex = '\%([\\*+/.:([]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)' . s:line_term
5757

58-
let s:one_line_scope_regex = '\<\%(if\|else\|for\|while\)\>[^{]*' . s:line_term
58+
let s:one_line_scope_regex = '\<\%(if\|else\|for\|while\)\>[^{;]*' . s:line_term
5959

6060
" Regex that defines blocks.
6161
let s:block_regex = '\%({\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=' . s:line_term

0 commit comments

Comments
 (0)