summaryrefslogtreecommitdiffstats
path: root/runtime/autoload
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-09 20:43:55 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-09 20:43:55 +0100
commitd47d52232bf21036c5c89081458be7eaf2630d24 (patch)
tree5b7031e52717248256f1d4d4307f241bce046184 /runtime/autoload
parent37402ed53475166cd988edbea1269fa4e9918dc4 (diff)
Update runtime files.
Diffstat (limited to 'runtime/autoload')
-rw-r--r--runtime/autoload/xmlformat.vim16
1 files changed, 10 insertions, 6 deletions
diff --git a/runtime/autoload/xmlformat.vim b/runtime/autoload/xmlformat.vim
index f227b5ee25..ea89401977 100644
--- a/runtime/autoload/xmlformat.vim
+++ b/runtime/autoload/xmlformat.vim
@@ -1,9 +1,9 @@
" Vim plugin for formatting XML
-" Last Change: Thu, 22 May 2018 21:26:55 +0100
-" Version: 0.1
-" Author: Christian Brabandt <cb@256bit.org>
-" Repository: https://github.com/chrisbra/vim-xml-ftplugin
-" License: VIM License
+" Last Change: Thu, 07 Dec 2018
+" Version: 0.1
+" Author: Christian Brabandt <cb@256bit.org>
+" Repository: https://github.com/chrisbra/vim-xml-ftplugin
+" License: VIM License
" Documentation: see :h xmlformat.txt (TODO!)
" ---------------------------------------------------------------------
" Load Once: {{{1
@@ -85,7 +85,11 @@ func! s:Trim(item)
endfunc
" Check if tag is a new opening tag <tag> {{{1
func! s:StartTag(tag)
- return a:tag =~? '^\s*<[^/?]'
+ let is_comment = s:IsComment(a:tag)
+ return a:tag =~? '^\s*<[^/?]' && !is_comment
+endfunc
+func! s:IsComment(tag)
+ return a:tag =~? '<!--'
endfunc
" Remove one level of indentation {{{1
func! s:DecreaseIndent()