Skip to content

[br][br] in docstring is not rendered properly in the hover widget #1055

Description

@OzelotVanilla

Godot version

v4.8.dev3.official [51105ccbe]

VS Code version

1.132.0

Godot Tools VS Code extension version

2.7.1

System information

macOS 15.7.7

Issue description

In Godot docstring, [br][br] is not rendered as an empty new line, and it is omitted.

For example:

## Some sentences.[br][br]
##
## Some sentences.[br][br]
##
## Some sentences but only one br.[br]
##
## Some sentences.[br][br]
##
## Some sentences.[br][br]
func sometest():
    pass

It will generate hover widget like this:

Image

[br] is not affected and it is rendered normally, while [br][br] is omitted.

In Godot, it will be rendered like this:

Image

Steps to reproduce

  1. Paste this code to any script file and hover onto the method name:
## Some sentences.[br][br]
##
## Some sentences.[br][br]
##
## Some sentences but only one br.[br]
##
## Some sentences.[br][br]
##
## Some sentences.[br][br]
func sometest():
    pass
  1. Observe the result.

PS: I am happy to provide a PR to fix it (after this issue is considered as a bug and should be fixed).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions