Skip to content

Markdown: validation: link: false positives in math code #323229

Description

@abkein

Not links are detected as links in math, for example:

$$
c = 3 \left[ a - b \right]
$$

produces a warning: No link definition found: 'a - b \right' (link.no-such-reference). Obviously there is no link in the expression.
Often square brackets are used to simplify the perception of a formula with a lot of parentheses, it's not me being weird.

Since VSCode does render math, I think the issue is relevant to VSCode.

I guess links shouldn't be validated in math code at all, or only inside \text{...}.

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.123.0
  • Commit: 6a44c35

Steps to Reproduce:

  1. Have "markdown.validate.enabled" = true in your settings
  2. Open a markdown document and paste the code (or any other containing brackets [ and ] on the same line):
    $$
    c = 3 \left[ a - b \right]
    $$
  3. See the error is present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions