-
Notifications
You must be signed in to change notification settings - Fork 60
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
Spaces in the path of the source file(or destination) should be escaped #159
Comments
I just ran into the same issue. Let me know if I can provide any information to help |
Yes, you can help to ask the author to fix it, just place the |
I have the same issue, since they said in Obsidian-Pandoc-Citations:
But without quotes we cannot escape spaces... |
I don't really understand what it means. What the |
I have the same problem. It appears that spaces cannot be escaped when entered in "Extra Pandoc arguments", meaning no filepaths can have spaces. I tried it on a filepath with no spaces and it works fine. |
I am having the same issue. As a temporary workaround, I created a symbolic link to my .bib file in my User folder and pass it to Pandoc. It would be cool though if this will be fixed in the future :) |
If I need to create a symbolic link to the file, I rather call pandoc
directly to do its job. 😅
Fabian S. Klinke ***@***.***> 於 2023年1月26日 週四 下午7:13寫道:
… I am having the same issue. As a temporary workaround, I created a
symbolic link to my .bib file in my User folder and pass it to Pandoc. It
would be cool though if this will be fixed in the future :)
—
Reply to this email directly, view it on GitHub
<#159 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE6W6ZZHV4D7AYPZ35KDALWUJL55ANCNFSM6AAAAAASED5EBM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
On Line 3356 of main.js, replace: And it'll work. Not sure why the the extraparameters value was being split at spaces anyways. |
I modified this .js: $vault_dir/plugins/obsidian-pandoc/main.js
I don't actually confirm if that is right.
And found following codes:
// The metadata title is needed for ePub and standalone HTML formats
// We use a metadata file to avoid being vulnerable to command
injection
if (input.metadataFile)
args.push('--metadata-file', input.metadataFile);
// Extra parameters
if (extraParams) {
extraParams = extraParams.flatMap(x => x.split(' ')).filter(x
=> x.length);
args.push(...extraParams);
}
So, I replace this:
*extraParams = extraParams.flatMap(x => x.split(' ')).filter(x =>
x.length);*
with this:
*extraParams = extraParams.flatMap((x) => x).filter((x) => x.length);*
And then I restart the Obsidian to make sure everything should be reloaded.
But I invoke "Pandoc Plugin: Export an Word Document (.docx)":
[image: image.png]
It still can't read my .md:
[image: image.png]
I don't know if anything else I should change?
…On Tue, May 2, 2023 at 11:52 AM GittyBruce ***@***.***> wrote:
On Line 3356, replace:
extraParams = extraParams.flatMap((x) => x.split(" ")).filter((x) =>
x.length);
with
extraParams = extraParams.flatMap((x) => x).filter((x) => x.length);
And it'll work. Not sure why the the extraparameters value was being split
at spaces anyways.
—
Reply to this email directly, view it on GitHub
<#159 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE6W66KYYNPY3KK55XPNMDXECAIRANCNFSM6AAAAAASED5EBM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Same issue with icloud path! |
@naive231 I found that after making the modification suggested by GittyBruce, using the following form for the Extra Pandoc arguments works:
Note that there are no quote marks and the spaces are not escaped with |
It reports failure like this:
I'm pretty sure that pandoc executive is in system path and I can convert the same document if I call pandoc in shell.
After some investigation, I figured out that the error is coming from the space in the path of the source file:
/Users/zhounaihong/Library/Mobile Documents/iCloud~md~obsidian/Documents2nd_brain/note/2022-11-18.md
If the space in
Mobile
andDocuemnts
isn't escaped with\
, pandoc in shell will result to the same error reported in obsidian.Hope this bug can be fixed in next release, thanks in advanced.
The text was updated successfully, but these errors were encountered: