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

Incorrect parameter displaying in tooltip. #537

Closed
serg3295 opened this issue May 13, 2021 · 2 comments
Closed

Incorrect parameter displaying in tooltip. #537

serg3295 opened this issue May 13, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@serg3295
Copy link
Contributor

Describe the bug
When comment of last parameter is an unordered list, the parameter is displayed incorrectly.

To Reproduce

---@param par1 string|'"text1"'|'"text2"' @event
---@param par2 function|' function(client, topic, message) end' @`function(client, topic, message)`.
--- - comment par2
---@return nil
function rr:on(par1, par2) end

Screenshots
luasrv11

Environment (please complete the following information):

  • OS: Windows
  • Is WSL remote? no
  • Client: VSCode
@sumneko
Copy link
Collaborator

sumneko commented May 13, 2021

I did some research and found out that it was because a code like this was generated in hover:

- xx
```lua
print(1)
```
---
```lua
print(1)
```

This code is explained in different places in different formats:

  • github and markdown extension of VSCode:
    EMAGWLZ4 0@@5$M7_2MUGJX
  • vscode and some other online play grounds:
    FA31BDH@_2(OR P8T7S18

The latter way of explanation will lead to some strange phenomena, and eventually lead to the problems you encountered.

I don't know what the correct specification is, so I can only suggest that you avoid this writing first (for example, insert a blank line under -comment par2 to explicitly indicate the end of the list syntax).

EDIT: I can try to insert a blank line before each ```.

@sumneko sumneko added the bug Something isn't working label May 13, 2021
sumneko added a commit that referenced this issue May 13, 2021
@serg3295
Copy link
Contributor Author

serg3295 commented May 13, 2021

Thank you for your detailed answer. I have inserted blank line under unnumbered list, and this solved issue.

EDIT. The commit works as well. I'll can remove blank line now. 😄
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants