Skip to content

JSDoc does not strip leading * inside markdown code block #23517

@mjbvz

Description

@mjbvz

TypeScript Version: 2.9.0-dev.20180418

Search Terms:

  • jsdoc
  • example
  • markdown

Code

/**
 * @example
 * ```
 * 1 + 2
 * ```
*/
export function foo() { }

Hover over foo

Bug:
The jsdoc content returned includes the leading * from the comment inside the code block:

[Trace  - 11:08:38 AM] Response received: quickinfo (13). Request took 2 ms. Success: true 
Result: {
    "kind": "function",
    "kindModifiers": "export",
    "start": {
        "line": 9,
        "offset": 17
    },
    "end": {
        "line": 9,
        "offset": 20
    },
    "displayString": "function foo(): void",
    "documentation": "",
    "tags": [
        {
            "name": "example",
            "text": "```\n * 1 + 2\n * ```"
        }
]
}

This is a regression from the current 2.8 builds

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationFixedA PR has been merged for this issueVS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestone

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions