From c1a6db11352d2e248c1d5c6bf6406e6c566b24a7 Mon Sep 17 00:00:00 2001 From: JamshedVesuna Date: Mon, 7 Sep 2015 17:21:20 -0700 Subject: [PATCH] Handle space in filepath names; Fixes #19 --- plugin/vim-markdown-preview.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/vim-markdown-preview.vim b/plugin/vim-markdown-preview.vim index 3fca16c..deabf41 100644 --- a/plugin/vim-markdown-preview.vim +++ b/plugin/vim-markdown-preview.vim @@ -30,9 +30,9 @@ function! Vim_Markdown_Preview() let curr_file = expand('%:p') if b:vim_markdown_preview_github == 1 - call system('grip ' . curr_file . ' --export /tmp/vim-markdown-preview.html') + call system('grip "' . curr_file . '" --export /tmp/vim-markdown-preview.html') else - call system('markdown ' . curr_file . ' > /tmp/vim-markdown-preview.html') + call system('markdown "' . curr_file . '" > /tmp/vim-markdown-preview.html') endif if OSNAME == 'unix' @@ -78,9 +78,9 @@ function! Vim_Markdown_Preview_Local() let curr_file = expand('%:p') if b: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 -- 2.45.2