diff options
Diffstat (limited to 'autoload/ale/fixers/xmllint.vim')
-rw-r--r-- | autoload/ale/fixers/xmllint.vim | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/autoload/ale/fixers/xmllint.vim b/autoload/ale/fixers/xmllint.vim index b14ffd36..9e478feb 100644 --- a/autoload/ale/fixers/xmllint.vim +++ b/autoload/ale/fixers/xmllint.vim @@ -1,4 +1,4 @@ -" Author: Cyril Roelandt <tipecaml@gmail.com> +" Author: Cyril Roelandt <tipecaml@gmail.com>, jiz4oh <me@jiz4oh.com> " Description: Integration of xmllint with ALE. call ale#Set('xml_xmllint_executable', 'xmllint') @@ -7,7 +7,14 @@ call ale#Set('xml_xmllint_indentsize', 2) function! ale#fixers#xmllint#Fix(buffer) abort let l:executable = ale#Escape(ale#Var(a:buffer, 'xml_xmllint_executable')) - let l:filename = ale#Escape(bufname(a:buffer)) + let l:filename = bufname(a:buffer) + + if empty(l:filename) + let l:filename = '%t' + else + let l:filename = ale#Escape(l:filename) + endif + let l:command = l:executable . ' --format ' . l:filename let l:indent = ale#Var(a:buffer, 'xml_xmllint_indentsize') |