-
-
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
Second pass of RST to RST conversion is not an identity #992
Comments
Did you try your original input with
Now run that through
This is not a valid RST nested list at all, because the sublist isn't indented far enough. It gets parsed as a list followed by a blockquote containing a list. And that's how pandoc interprets it, too:
Does that explain what you're seeing? |
OK, there is a real bug here. Your original input
is getting parsed as a definition list. That's not how rst2html.py does it, but that doesn't worry me so much since this is invalid rst anyway. The problem is that pandoc is rendering this definition list as something that does not parse as a definition list (because of the blank line between the term and the definition). The blank line is there because pandoc forces a blank line before lists, but it should not do so in this case. |
Thanks for this detailed explanation. IMHO the fact that the second pass of Pandoc is producing different output than the first may be a more general indication of inconsistency between what Pandoc thinks it renders and what is the output’s parse result. So perhaps it can be used to automatically find bugs by generating some random data. |
+++ Krzysztof Jurewicz [Sep 29 13 03:39 ]:
Yes, good idea. It would be easy to automate this with QuickCheck. |
Given the following input:
the command
pandoc -f rst -t rst
gives us the following resultHowever running the same command twice (
pandoc -f rst -t rst | pandoc -f rst -t rst
) gives us different indentation:Further passes don’t change the output.
Tested on pandoc 1.12.0.2.
The text was updated successfully, but these errors were encountered: