DavidAnson / vscode-markdownlint

Markdown linting and style checking for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
MIT License
930 stars 170 forks source link

getting MD052 on valid footnotes, even after disabling MD052 #271

Closed af4jm closed 1 year ago

af4jm commented 1 year ago

I don't use link definitions, but I do use footnotes. Since MD052 & MD053 were added, I've noticed every footnote getting flagged for "No link definition found: '^1.1' (link.no-such-reference)", so disabled those 2 rules in markdownlint config for that folder, yet the violations persist, even after restarting VSCode. (other settings in the config file are honored)

Example markdown & rendering

Some text with a footnote.[^1.1]

[^1.1]: the footnote

image image

relevant excerpts from relevant files

VSCode settings for the open folder

{
    "markdownlint.config": {
        "extends": ".markdownlint.json"
    }
}

.markdownlint.json in the root of the open folder

{
    "reference-links-images": false,
    "link-image-reference-definitions": false
}

full config file (that the above is excerpted from, showing other settings that do work as documented)

{
    "$schema": "https://raw.githubusercontent.com/DavidAnson/markdownlint/main/schema/markdownlint-config-schema.json",
    "heading-style": { "style": "atx" },
    "ul-style": { "style": "consistent" },
    "ul-indent": { "indent": 4 },
    "no-trailing-spaces": { "br_spaces": 0, "list_item_empty_lines": true, "strict": true },
    "line-length": false,
    "no-duplicate-heading": false,
    "single-title": false,
    "no-trailing-punctuation": false,
    "no-blanks-blockquote": false,
    "ol-prefix": false,
    "ol-prefix-start": { "style": "ordered" },
    "no-inline-html": false,
    "hr-style": { "style": "***" },
    "no-emphasis-as-heading": false,
    "first-line-heading": false,
    "code-block-style": { "style": "fenced" },
    "code-fence-style": { "style": "backtick" },
    "emphasis-style": { "style": "asterisk" },
    "link-fragments": false,
    "reference-links-images": false,
    "link-image-reference-definitions": false
}
DavidAnson commented 1 year ago

The example you show above does not produce a warning from markdownlint as you can see here: https://dlaa.me/markdownlint/#%25m%23%20Issue%20271%0A%0ASome%20text%20with%20a%20footnote.%5B%5E1.1%5D%0A%0A%5B%5E1.1%5D%3A%20the%20footnote%0A

I suspect the error you are seeing is coming from something else, possibly VS Code itself. To make sure markdownlint is not responsible, you can temporarily disable it in the extension tab.

af4jm commented 1 year ago

doh! you're right, it's the link checking they added into VSCode a few months back, hopefully they stop playing with the settings soon

in case anyone else finds this the relevant setting is "markdown.validate.referenceLinks.enabled": "ignore"