-
Notifications
You must be signed in to change notification settings - Fork 2
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
Handle more gracefully non-supported path syntax by Pandoc on Windows #31
Comments
pandoc_convert()
preprocess the file on Windowspandoc_convert()
errors with non-standard paths on Windows
Those are Pandoc errors. 🤔
In first case we can indeed resolve the path and normalize. I think this would work and have no issue. I just don't want to use absolute path everywhere though just to handle this specific syntax
The example you gave has also the other issue above. So is this link to the other issue ? Or do file with spaces not work at all, even when the path is not using the specific It could be a quoting issue also when passing the file path as argument from R to I also renamed the issue to reflect more the generic Pandoc relation |
pandoc_convert()
errors with non-standard paths on Windows
Hi, path with
|
Thanks for testing ! I'll do the tweak for the resolving looking at how rmarkdown does it. For the space, it seems an issue really in this package and quoting for the pandoc CLI as it seems to work with Pandoc CLI directly > cd $env:TEMP
> echo "# test" > 'file with space.ext'
> cat '.\file with space.ext'
# test
> pandoc -t html '.\file with space.ext'
[WARNING] Could not deduce format from file extension .ext
Defaulting to markdown
<h1 id="test">test</h1>
> rm '.\file with space.ext'
> cd |
We now use Regarding the space, I think it is already working. I can't reproduce and I already have test for this which is passing pandoc/tests/testthat/test-pandoc-convert.R Lines 16 to 26 in 628302f
Is this happening for you with a specific Pandoc version maybe ? I am closing this as space in file is working for me. Please reopen or a new one with new information if something is still not working with dev version |
Hi,
thanks for the great package.
On windows, using
I have to use (and it works)
Maybe R could process first if the file exists before trying to run pandoc.
Also path with space doesn't work (no way to fix this other than to rename the file
(Notice the absence of the rest of the file name in the error message)
Thanks!
Running with latest R package version and pandoc 3.1.1
The text was updated successfully, but these errors were encountered: