vuejs / vetur

Vue tooling for VS Code.
https://vuejs.github.io/vetur/
MIT License
5.75k stars 593 forks source link

JSDoc backticks not rendering correctly #3507

Open thany opened 2 years ago

thany commented 2 years ago

Info

Problem

JSDoc from an imported javascript file is not completely correctly displayed.

When using backticks inside the description of a @param of a plain function, they will be displayed as-is. This only happens in .vue files when importing from plain javascript files. Doing the same thing in another javascript file makes the JSDoc display correctly.

For other tags including @returns and @template this is working correctly. This problem only exists for @param.

Compare these: image image

Reproducible Case

  1. In your Vue project, creating a plain javascript file
  2. Add a function with JSDoc, and make sure to also add @param descriptions, as you should ;)
  3. Put any backticked word in there.
  4. Import this function in a .vue file.
  5. Try using the function, pressing Ctrl+Shift+Space if neccesary to pop up the JSDoc.
alexander-gekov commented 2 years ago

Platform: Windows 11 Vetur version: 0.36.0 VS Code version: 1.71.2


I have tried putting back ticks and seems to be working on my end. image

image