Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't export when defining extra pandoc arguments containing spaces #77

Open
mgmeyers opened this issue Oct 20, 2021 · 4 comments · May be fixed by #211
Open

Can't export when defining extra pandoc arguments containing spaces #77

mgmeyers opened this issue Oct 20, 2021 · 4 comments · May be fixed by #211

Comments

@mgmeyers
Copy link

I use a reference document with pandoc like so:

--reference-doc=/Users/matt/Library/Mobile Documents/iCloud~md~obsidian/Documents/Knowledge Garden/Templates/essay-template.docx

But because "Extra Pandoc arguments" are split on spaces, the plugin sees this as three arguments rather than one.

https://github.com/OliverBalfour/obsidian-pandoc/blob/master/pandoc.ts#L141

This throws the error:

pandoc: Documents/iCloud~md~obsidian/Documents/Knowledge: openBinaryFile: does not exist (No such file or directory)
@Limezy
Copy link

Limezy commented Oct 21, 2021

Hi,
Have you tried using \ as an escape ?

--reference-doc=/Users/matt/Library/Mobile Documents/iCloud~md~obsidian/Documents/Knowledge\ Garden/Templates/essay-template.docx

@mgmeyers
Copy link
Author

@Limezy Yeah, but no luck. The value of "Extra Pandoc arguments" is split on space characters before it's sent to the command line, so escaping that space has no effect.

@ndegroot
Copy link

I can confirm this. I did find a workaround for (path) spaces in plugin settings Please test it.

@naive231
Copy link

naive231 commented Nov 13, 2022

workaround for (path) spaces in plugin settings

I think you're missing another '\'. It should be placed in front of "Documents" of "Mobile Documents" like:

--reference-doc=/Users/matt/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Knowledge\ Garden/Templates/essay-template.docx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants