Skip to content

WikiExport: cmd should use double quote under windows #351

@VimWei

Description

@VimWei

Description

There's a wiki page under g:wiki_root/test.md

# test
This is a test markdown page.

Similar to :WikiExport test.pdf , an error occurs after executing :WikiExport test.html .

wiki: Something went wrong when running cmd:
  pandoc  -f markdown -o 'test.html' 'D:/WeirdData/wiki/test.md.tmp'
  Shell output:
  [WARNING] Could not deduce format from file extension .html'

  Defaulting to html

pandoc: 'D:/WeirdData/wiki/test.md.tmp': openBinaryFile: invalid argument (Invalid argument)
wiki: Page was exported to test.html

Why does pandoc's input filename include ".tmp"?

Comparison: Custom pandoc conversion command

This is my custom function: https://github.com/VimWei/vim-init/blob/master/autoload/Pandoc.vim

The successful execution of the following commands confirms that my pandoc and MiKTeX installations are correct.

command! PandocToPDF call Pandoc#ToPdf()
command! PandocToDOCX call Pandoc#ToDocx()
command! PandocToHTML call Pandoc#ToHtml()

Environment

  • Windows 10 Pro 22H2
  • gvim_9.1.0363_x64_signed.exe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions