Skip to content

Bad Formatting in Documentation when Hovering Over a Function Name #118779

@mdko

Description

@mdko
  • VS Code Version: 1.54.1
  • OS Version: macOS 11.2.3

Steps to Reproduce:

  1. Given the following documented code:
def foo(a, b):
    """ Do something on a and b
    :param a: the first argument; this one's pretty
        interesting and requires two lines.
    :param b: the second argument
    :return: a + b
    """
    return a + b

hovering over the function will split the description of the a parameter:
Screen Shot 2021-03-11 at 5 43 45 PM

  1. When I remove the indent preceding "interesting":
def foo(a, b):
    """ Do something on a and b
    :param a: the first argument; this one's pretty
    interesting and requires two lines.
    :param b: the second argument
    :return: a + b
    """
    return a + b

hovering will show this instead:
Screen Shot 2021-03-11 at 5 46 33 PM

  1. I expect the hover help documentation of parameters/return values with a leading indent (Example 1 above) to treat that indent as a single whitespace (and thus produce something like Example 2 above).

Does this issue occur when all extensions are disabled?: Yes

Metadata

Metadata

Assignees

Labels

*caused-by-extensionIssue identified to be caused by an extension

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions