You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wrapping the first line of a multiline Python docstring #22
Greetings! First off, thank you for this extension, it's awesome and I use it on a daily basis. There's a situation I routinely run into with Python that breaks and needs to be fixed manually.
"""I have a docstring that starts like this and spans multiple lines and I want to reflow the first line so it wraps correctly.Docstring continues..."""
If I select the entire first line (by clicking the line number in the gutter) and hit Alt+Q to rewrap it:
"""I have a docstring that starts like this and spans multiple lines and I want to reflow the first"""linesoitwrapscorrectly.
Docstringcontinues...
"""
I have to remove the quotes it added on the next line. I think it's assuming it should be a single-line docstring and trying to close it.
I spent a few hours today to see if I could adjust the Python parser but ultimately had to admit defeat. I don't know F# but it seems like it could be related to how the regex capture groups handle docstrings, or it could be something in blockComment's overall processing.
It would be wonderfully helpful if this kind of docstring formatting could be supported and I really appreciate any time spent looking into it. Happy to help or test if needed.
Activity
ellerychan commentedon Sep 11, 2026
Duplicate of Issue #10
dnut commentedon Oct 24, 2026
This has been fixed and released in version 18.3.0.