Skip to content

Commit 396829c

Browse files
authored
comment handling
1 parent 4d60216 commit 396829c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

indent/javascript.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ endfunction
7575

7676
" configurable regexes that define continuation lines, not including (, {, or [.
7777
let s:opfirst = '^' . get(g:,'javascript_opfirst',
78-
\ '\%([<>,?^%|*&]\|\/[/*]\@!\|\([-.:+]\)\1\@!\|=>\@!\|in\%(stanceof\)\=\>\)')
78+
\ '\%([<>,?^%|*/&]\|\([-.:+]\)\1\@!\|=>\@!\|in\%(stanceof\)\=\>\)')
7979
let s:continuation = get(g:,'javascript_continuation',
8080
\ '\%([<=,.?/*^%|&:]\|+\@<!+\|-\@<!-\|=\@<!>\|\<in\%(stanceof\)\=\)') . '$'
8181

@@ -193,7 +193,7 @@ function GetJavascriptIndent()
193193
return 0
194194
endif
195195

196-
let l:line = substitute(l:line,'^\s*\%(\/\*.\{-}\*\/\s*\)*','','')
196+
let l:line = substitute(substitute(l:line,'^\s*\%(\/\*.\{-}\*\/\s*\)*','',''),'^\/[/*].*','','')
197197

198198
" the containing paren, bracket, curly. Many hacks for performance
199199
call cursor(v:lnum,1)

0 commit comments

Comments
 (0)