-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Invalid link references in reStructuredText #511
Comments
Related to this issue, Pandoc is not able to correctly parse indirect hyperlink targets (the last example): #512 |
I think I came across this same issue with duplicate text. The reStructuredText output from pandoc generated the following warning when I passed the pandoc output to Python's Docutils (specifically
Another option would be for pandoc to issue a warning in this case. |
Note: by default pandoc will produce the output you desire,
It only produces reference-style links if you use the I'm guessing, though, that you want reference style links in general; you just want pandoc to be intelligent enough not to use them when it will produce problems. |
This issue discusses two closely related issues: outputting reference-style links with duplicate reference names (the original issue that produces incorrect HTML) and outputting embedded URIs (pandoc's default behavior) with duplicate reference names (the behavior I reported that yields a warning when the output is passed to I think the solution in both cases is to use anonymous references, which @roxeteer described partially in the original post and which are discussed here in more detail: As described in the links above, anonymous references can be achieved by using a double underscore instead of a single underscore in both cases. In the case of embedded URI's (non-reference-style links), this would mean doing this--
instead of this--
|
@cjerdonek, thanks. I should have a fix soon. |
Awesome, thanks again! 😀 |
If multiple links have the same clickable text, the generated references are incorrect in reStructuredText. For example:
This Markdown sample:
generates this reST code:
which fails in Sphinx reST parser and in Pandoc produces this incorrect HTML:
The solution would be that Pandoc either generates code with embedded URIs or uses indirect hyperlink targets:
or
The text was updated successfully, but these errors were encountered: