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
Docformatter can break an RST cross-reference #124
Comments
I can confirm the issue, which not affect rST cross-references, but virtually any space-separated rST directive. See for example this Python code: def setup():
"""Register ``..click:example::`` and ``.. click:run::`` directives, augmented with ANSI coloring."""
pass Which is formatted with a split in the middle of a double-backticked sequence: --- before/./rst-docstring.py
+++ after/./rst-docstring.py
@@ -1,3 +1,6 @@
def setup():
- """Register ``..click:example::`` and ``.. click:run::`` directives, augmented with ANSI coloring."""
+ """Register ``..click:example::`` and ``..
+
+ click:run::`` directives, augmented with ANSI coloring.
+ """
pass These results have been produced with the latest development version of |
This issue might be related to #79, in which a double invokation of |
There's probably some inspiration on how to handle this in the recent PR that fixed URL wrapping (#115). You can see there a special case for URLs using an rST syntax ( |
I'm forced to pin |
I see there are some existing issues about Sphinx and RST (e.g. #68, #60, #78, #61), but I don't see one mentioning this specific problem.
Docformatter version 1.5.0.
Input:
First pass (still OK):
Second pass (broken):
The text was updated successfully, but these errors were encountered: