Skip to content

Commit 6f3e6e9

Browse files
authored
keep string type
1 parent 8a40889 commit 6f3e6e9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

indent/javascript.vim

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,16 @@ endif
4040
let s:expr_case = '\<\%(\%(case\>\s*[^[:blank:]:].\{-}\)\|default\)\s*:\C'
4141
" Regex of syntax group names that are or delimit string or are comments.
4242
let s:syng_strcom = '\%(s\%(tring\|pecial\)\|comment\|regex\|doc\|template\)'
43-
4443
" Expression used to check whether we should skip a match with searchpair().
4544
let s:skip_expr = "synIDattr(synID(line('.'),col('.'),0),'name') =~? '".s:syng_strcom."'"
4645
function s:skip_func(lnum)
4746
if !s:free || search('`','nW',a:lnum) || search('\*\/','nW',a:lnum)
48-
let s:free = !eval(s:skip_expr . '. "\\|html"')
47+
let s:free = !eval(s:skip_expr . " . '\\|html'")
4948
let s:looksyn = s:free ? line('.') : s:looksyn
5049
return !s:free
5150
endif
5251
let s:looksyn = line('.')
53-
return (search('\/','nbW',s:looksyn) || search('[''"\\]','nW',s:looksyn)) && eval(s:skip_expr . '. "\\|html"')
52+
return (search('\/','nbW',s:looksyn) || search('[''"\\]','nW',s:looksyn)) && eval(s:skip_expr . " . '\\|html'")
5453
endfunction
5554

5655
if has('reltime')

0 commit comments

Comments
 (0)