This commit is contained in:
Adam Stankiewicz
2017-11-19 21:26:59 +01:00
parent 0e9041f29a
commit d219055bc8
32 changed files with 438 additions and 455 deletions

View File

@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'qml') == -1
" Language: QML
" Author: Robert Kieffer
" URL:
" Last Change: 2010-03-27 (Happy Birthday, Dash!)
" Last Change: 2017-10-27
"
" Improved JavaScript indent script.
@@ -22,10 +22,10 @@ if exists("*GetJsIndent")
finish
endif
" Clean up a line of code by removing trailing '//' comments, and trimming
" Clean up a line of code by removing trailing '//' and '/* */' comments, and trimming
" whitespace
function! Trim(line)
return substitute(substitute(a:line, '// .*', '', ''), '^\s*\|\s*$', '', 'g')
return substitute(substitute(substitute(a:line, '// .*', '', ''), '/\* .* \*/', '', ''), '^\s*\|\s*$', '', 'g')
endfunction
function! GetJsIndent()