From d9b6d77e90bea67ca714ae5695717956e65f9e9a Mon Sep 17 00:00:00 2001 From: EinfachToll Date: Mon, 17 Dec 2018 20:27:15 +0100 Subject: [PATCH] Accept '.foo' and 'foo' as value for the ext option --- autoload/vimwiki/vars.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/autoload/vimwiki/vars.vim b/autoload/vimwiki/vars.vim index 77689f7..198acb4 100644 --- a/autoload/vimwiki/vars.vim +++ b/autoload/vimwiki/vars.vim @@ -263,8 +263,13 @@ function! s:validate_settings() \ substitute(wiki_settings['path'], '[/\\]\+$', '', '').'_html/') endif - let wiki_settings['template_path'] = s:normalize_path(wiki_settings['template_path']) - let wiki_settings['diary_rel_path'] = s:normalize_path(wiki_settings['diary_rel_path']) + let wiki_settings['template_path'] = s:normalize_path(wiki_settings['template_path']) + let wiki_settings['diary_rel_path'] = s:normalize_path(wiki_settings['diary_rel_path']) + + let ext = wiki_settings['ext'] + if !empty(ext) && ext[0] != '.' + let wiki_settings['ext'] = '.' . ext + endif endfor endfunction