-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
image path with escaped quote cannot be found when run --standalone #1489
Comments
Can you post the precise command you're using and the pandoc version? Also, why are you escaping the quotes?
|
I'm using a series of R libraries that call pandoc 1.12.3 (via the rmarkdown package). The WebGL code generated by one library, rgl, generates strings in the format noted above. Here's a related link. I've also submitted a request for the rgl library to update some javascript to work better with pandoc. Below is the pandoc command.
|
I ran into one other javascript parsing item that appears to give pandoc trouble. If spacing isn't added around conditional statements in the
I can file as a new issue if desired. |
Does this js snippet occur inside html script tags in the md file? Can you post the whole context so I can try it?
|
Here are a few
|
I suspect this has to do with |
@jrowen, I was unable to reproduce what you're seeing with the command line you gave. However, with
I got this both with 1.12.4.2 and with the dev version. Now, it seems to me that the problem is that the |
PS. the dev version gives the better message |
This confirms my hunch:
|
More clues:
So the problem traces to the tagsoup library's parsing of this input into tags. I believe this is a bug in tagsoup, but I may not fully understand the HTML 5 parsing algorithm, which tagsoup purports to implement. I will check with the tagsoup maintainer. |
@jgm, using your simple example, the changes below work as expected, creating a self-contained html doc.
Here are a couple examples of the other script parsing issues I mentioned. If a space isn't included at the end of the
Finally, if space is not included around the
|
@jrowen, I don't see any bugs here. In your second example, I see (using 1.12.4.2):
Here the contents of the javascript string are just as they were in the source, which is the expected behavior. ( In the third example:
the javascript section is just as you included it, with a correct closing tag. Do you get different results when you run the same command with the same input as above? |
Below is the output (version 1.12.3) I see for the second example (some
and here is the output if I add a space, using
|
Here is the same for the third example, without space (
and with space (
It looks like I'm using a slightly older version, so maybe this has now been fixed. |
@jrowen, if you are using 1.12.3, then I suggest you simply upgrade. |
When run with the
--standalone
arg, pandoc cannot find images if the path is wrapped in escaped quotes.This example,
will generate the error (97),
Removing the escaped quote for the
src
attribute eliminates the error.One other related item, if a space is not included after the
width
attribute (e.g.width=400/>
) the output text looks like the followinginstead of the expected
The text was updated successfully, but these errors were encountered: