Skip to content
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

Breaking block quotes #4

Closed
kayhayen opened this issue Nov 28, 2020 · 2 comments
Closed

Breaking block quotes #4

kayhayen opened this issue Nov 28, 2020 · 2 comments

Comments

@kayhayen
Copy link

kayhayen commented Nov 28, 2020

Working on my Changelog.rst for Nuitka, I discovered this breaking change done by rstfmt 0.0.6:

From this code:

python 2.6::

   Pystone(1.1) time for 50000 passes = 0.48
   This machine benchmarks at 104167 pystones/second

it creates:

python 2.6:

.. code::

   Pystone(1.1) time for 50000 passes = 0.48
   This machine benchmarks at 104167 pystones/second

The later is wrong, this is not code (I think Python is the default). When I run it again, it does not complain about invalid Python, but if I add it, it does. The rst2pdf however complains very loudly about this rest code for that reason. So I think, this reveals 2 bugs in rst2fmt, fist missing default language, second turning block quotes to code, which is not correct. I am merely quoting program outputs with block quotes.

On a side note, I was deeply impressed by the black integration you are using there, very nice, and it found a bunch of syntax errors in my code snippets, good job there, making that happen, very appreciated. For now, I will do a search and replace to fix these up, but I can use the end result otherwise I believe.

@kayhayen
Copy link
Author

I have updated to 0.0.7 from PyPI (for which code is on dev, but not on master) but the issue here is still present.

@kayhayen
Copy link
Author

kayhayen commented Apr 2, 2021

The issue is still present, but I checked in the official docs, and it says this that the change I am complaining about is absolutely valid: https://docutils.sourceforge.io/docs/ref/rst/directives.html#id44

It's just that rst2pdf will not accept it that way, but that's just a search and replace away. That's not your issue. Not sure yet about Nikola, but I guess it either works there, or it's their issue as well.

The other issues I can confirm are all solved. I am going to add it to my development requires and commit hook to have the automatic formatting. Big relief, thanks for your hard work on this.

@kayhayen kayhayen closed this as completed Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant