From a864be58a44d77b3ecbfbde87af9ab0db22f43ae Mon Sep 17 00:00:00 2001 From: Renzo Poddighe Date: Tue, 15 Dec 2015 10:48:48 +0100 Subject: [PATCH] Correctly handle spaces in local filepaths --- plugin/vim-markdown-preview.vim | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugin/vim-markdown-preview.vim b/plugin/vim-markdown-preview.vim index 622b774..2c8f013 100644 --- a/plugin/vim-markdown-preview.vim +++ b/plugin/vim-markdown-preview.vim @@ -97,10 +97,9 @@ function! Vim_Markdown_Preview_Local() let curr_file = expand('%:p') if g:vim_markdown_preview_github == 1 - call system('grip "' . curr_file . '" --export ' . curr_file . '.html') + call system('grip "' . curr_file . '" --export "' . curr_file . '".html') else - call system('markdown "' . curr_file . '" > ' . curr_file . '.html') - + call system('markdown "' . curr_file . '" > "' . curr_file . '".html') endif if OSNAME == 'unix' @@ -121,12 +120,12 @@ function! Vim_Markdown_Preview_Local() endif if OSNAME == 'mac' - call system('open -g ' . curr_file . '.html') + call system('open -g "' . curr_file . '".html') endif if g:vim_markdown_preview_temp_file == 1 sleep 200m - call system('rm ' . curr_file . '.html') + call system('rm "' . curr_file . '".html') endif endfunction -- 2.45.2