Skip to content

Improper @example parsing when an at-sign @ is used in the code-block. #38922

Closed
@JHawkley

Description

@JHawkley

Noticed an issue with the @example JSDoc tag when the example happens to use an @ sign, such as for an email address (my case).

  • VSCode Version: 1.45.1
  • OS Version: Ubuntu 20.04

Steps to Reproduce:

  1. Make an @example JSDoc tag similar to the below:
/**
 * @example Example Output
 * {
 *   name: "Testy McTest",
 *   email: "testy.mctest@not_an_email.com"
 *   gender: "ambiguous"
 * }
 */
const theProfile = getProfile();
  1. Observe the tooltip for theProfile. VSCode parses the @not_an_email as a JSDoc tag, breaking the code formatting. It will do this even if the example code is fenced in back-ticks, with slightly different output.

Does this issue occur when all extensions are disabled?: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions