micropython-stubber icon indicating copy to clipboard operation
micropython-stubber copied to clipboard

improve handling of trailing underscores in .pyi docstrings

Open Josverl opened this issue 7 months ago • 0 comments

currently these are not rendered correctly in VSCode Image

a few thousand `_. Image

In reStructuredText the trailing underscore in a construct like that uses the littlefs v2 filesystem format_. signals an inline hyperlink. The text within the backtick is the link text and the optional URL is provided in angle brackets. Without the trailing underscore, reStructuredText wouldn’t interpret the markup as a hyperlink.

Possible solutions:

  • clean up in docstring processing
    • both foo_ and foo_ are common
    • risky for sequences like On success, the ``_IRQ_PERIPHERAL_DISCONNECT`` or ``_IRQ_CENTRAL_DISCONNECT`` event will be raised.
  • raise an issue with vscode to render this correctly

Josverl avatar Apr 22 '25 12:04 Josverl