Skip to content

Commit faf8bda

Browse files
authored
containing braces which aren't blocks
1 parent 5900fce commit faf8bda

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
@@ -83,7 +83,7 @@ endfunction
8383
" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader
8484
function s:IsBlock()
8585
return getline(line('.'))[col('.')-1] == '{' && !search(
86-
\ '\C\%(\<return\s*\|\%([-=~!<*+,.?^%|&\[(]\|=\@<!>\|\*\@<!\/\|\<\%(var\|const\|let\|yield\|delete\|void\|t\%(ypeof\|hrow\)\|new\|\<in\%(stanceof\)\=\)\)\_s*\)\%#','bnW') &&
86+
\ '\C\%(\<return\s*\|\%([-=~!<*+,.?^%|&\[(]\|=\@<!>\|\*\@<!\/\|\<\%(var\|const\|let\|import\|export\|yield\|delete\|void\|t\%(ypeof\|hrow\)\|new\|\<in\%(stanceof\)\=\)\)\_s*\)\%#','bnW') &&
8787
\ (!search(':\_s*\%#','bW') || (!s:GetPair('[({[]','[])}]','bW',200) || s:IsBlock()))
8888
endfunction
8989

0 commit comments

Comments
 (0)