Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested markdown lists not correctly displayed in hover tooltip #965

Closed
1 of 4 tasks
rH4rtinger opened this issue Aug 16, 2023 · 0 comments · Fixed by redhat-developer/yaml-language-server#947
Closed
1 of 4 tasks
Milestone

Comments

@rH4rtinger
Copy link

Describe the bug

Having a nested list in a markdownDescription in a JSON schema does not display the tooltip correctly when hovered over the property.

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "properties": {
        "foo": {
            "type": "string",
            "markdownDescription": "\n\nField foo\n* `a`; has childs:\n  * `b`; some text\n  * `c`; some other text\n"
        },
        "bar": {
            "type": "string",
            "markdownDescription": "\n\nField bar\n* `a`; has childs:\n\t* `b`; some text\n\t* `c`; some other text\n"
        }
    }
}

When having a new file that is using the above json schema and you press Control + Space to see your properties, the list looks correct.

image

However, if you used the property and hovered over your property or let you show your documentation via shortcut, the nested list no longer looks correct

image

It is no longer a nested list. Only the top level elements are displayed correctly.

Expected Behavior

I expect that the hovered list is the same as the Control + Space list and to see the correct nested list

Current Behavior

When hovering a property the nested list is not displayed correctly

Steps to Reproduce

  1. create a json schema as above
  2. link the schema to an file
  3. add the property foo and hover over its tooltip

Workaround

By using \t instead of spaces (property bar), it will display in both ways correctly. However, tabs are not always common to use

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants