~dricottone/vim-markdown-preview

a864be58a44d77b3ecbfbde87af9ab0db22f43ae — Renzo Poddighe 8 years ago 956b154
Correctly handle spaces in local filepaths
1 files changed, 4 insertions(+), 5 deletions(-)

M plugin/vim-markdown-preview.vim
M plugin/vim-markdown-preview.vim => plugin/vim-markdown-preview.vim +4 -5
@@ 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