Open naive231 opened 2 years ago
I just ran into the same issue. Let me know if I can provide any information to help
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 \
in front of his path variable or place additional "
surround with his path variable in his source.😀
I have the same issue, since they said in Obsidian-Pandoc-Citations:
Note: it's also possible to put --metadata bibliography=/path/to/report.bib (without any quotes) on a new line in the Extra Pandoc arguments setting to save typing.
But without quotes we cannot escape spaces...
Note: it's also possible to put --metadata bibliography=/path/to/report.bib (without any quotes) on a new line in the Extra Pandoc arguments setting to save typing.
I don't really understand what it means. What the metadata
or bibliography
options for?
@OliverBalfour I think we just want an option to let us specified my own output path can solve this problem, and I think you don't need to spent too much efforts to dealt with the "space" problem at all. Maybe you should give this a shot.
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 https://github.com/OliverBalfour/obsidian-pandoc/issues/159#issuecomment-1404860753, 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: 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.
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 https://github.com/OliverBalfour/obsidian-pandoc/issues/159#issuecomment-1530833336, 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!
Looks like #136, #113, #86, #77 all reference the same problem. Some of them provide workarounds.
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: @.>
@naive231 I found that after making the modification suggested by GittyBruce, using the following form for the Extra Pandoc arguments works:
--defaults=/file path/with spaces/defaults.yaml
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.