From c8f34a9a3efa6e260e97c9c064f7e6cb8a099aa9 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 29 Jul 2019 02:37:38 +0200 Subject: vim-patch:d47d52232bf2 Update runtime files. https://github.com/vim/vim/commit/d47d52232bf21036c5c89081458be7eaf2630d24 --- runtime/autoload/xmlformat.vim | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'runtime/autoload/xmlformat.vim') 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 -" Repository: https://github.com/chrisbra/vim-xml-ftplugin -" License: VIM License +" Last Change: Thu, 07 Dec 2018 +" Version: 0.1 +" Author: Christian Brabandt +" 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 {{{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 =~? '