-
Notifications
You must be signed in to change notification settings - Fork 86
Closed
Labels
C: conventionRelates to docstring format conventionRelates to docstring format conventionP: bugPEP 257 violation or existing functionality that doesn't work as documentedPEP 257 violation or existing functionality that doesn't work as documented
Description
docformatter doesn't correctly recognize the short form of anonymous hyperlink references (__ URI) as a special block, and merges them into the preceding paragraph:
"""[...]
This graphics format generates terminal escape codes that transfer
- PNG data to a TTY using the `kitty graphics protocol`__.
-
- __ https://sw.kovidgoyal.net/kitty/graphics-protocol/
+ PNG data to a TTY using the `kitty graphics protocol
+ `__. __ https://sw.kovidgoyal.net/kitty/graphics-protocol/
"""This breaks the reST, and makes Sphinx unable to correctly process the reference.
Note that this only affects this shorter form; the long form (.. __: URI) is unaffected. The following variation (correctly) remains unchanged by docformatter:
"""[...]
This graphics format generates terminal escape codes that transfer
PNG data to a TTY using the `kitty graphics protocol`__.
.. __: https://sw.kovidgoyal.net/kitty/graphics-protocol/
"""
Bisecting brought up 7898b69 as the first "bad" commit, which is exactly v1.6.0. The earlier 917fed9 also changed the output already, but in a slightly different way and it was probably rewritten anyways.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C: conventionRelates to docstring format conventionRelates to docstring format conventionP: bugPEP 257 violation or existing functionality that doesn't work as documentedPEP 257 violation or existing functionality that doesn't work as documented