python-docstring-highlighter icon indicating copy to clipboard operation
python-docstring-highlighter copied to clipboard

Incorrect docstring parsing

Open Andrej730 opened this issue 9 months ago • 0 comments

Snippet:


def test():
    """Docstring for test

    :return: Description
    :rtype: Literal[25]"""
    return 25

test()

Without python docstring highlighter:

Image

With python docstring highlighter (note that return and test() are also parsed as part of the string):

Image

I understand that it would be a non-PEP 257-compliant doc-string, but still.

Andrej730 avatar Apr 26 '25 08:04 Andrej730