Closed marcospgp closed 2 months ago
Can you provide some detail? How are you disabling the rule? What makes you think it wasn't disabled like the others? Can you link to the project or any examples?
---
layout: page
title: Notes
---
it seems like including this Jekyll front matter in the markdown file is what causes the disabling of rule MD025 to be ignored.
That example - as is or with simple content - does not produce an MD025 warning: https://dlaa.me/markdownlint/#%25m---%0Alayout%3A%20page%0Atitle%3A%20Notes%0A---%0A%0AText%0A
One has to include some level 1 headers:
---
layout: page
title: Notes
---
# Text
# Test 2
On Tue, Apr 9, 2024, 21:52 David Anson @.***> wrote:
That example - as is or with simple content - does not produce an MD025 warning: https://dlaa.me/markdownlint/#%25m---%0Alayout%3A%20page%0Atitle%3A%20Notes%0A---%0A%0AText%0A
— Reply to this email directly, view it on GitHub https://github.com/DavidAnson/vscode-markdownlint/issues/332#issuecomment-2046028404, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2NZ7IQ4JLCHS3IFX7274TY4RIH3AVCNFSM6AAAAABF63OIZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBWGAZDQNBQGQ . You are receiving this because you authored the thread.Message ID: @.***>
That second example produces two MD025 warnings and both can be disabled via configuration: https://dlaa.me/markdownlint/#%25m---%0Alayout%3A%20page%0Atitle%3A%20Notes%0A---%0A%0A%23%20Text%0A%0A%23%20Test%202%0A%0A%3C!--%20markdownlint-configure-file%20%7B%0A%20%20%22MD025%22%3A%20false%0A%7D%20--%3E%0A
@DavidAnson This is what my VSCode setting for the rules looks like:
"markdownlint.config": {
// Disable heading style checking.
// Thinks that "## Calling C++ from C#" is "atx_closed" heading style (such
// as "## My heading ##").
"MD003": false,
// Allow hard tabs, such as when copy pasting code samples.
"MD010": false,
// Same as MD003
"MD020": false,
// Allow duplicate headings.
"MD024": false,
// MD025 - Multiple top-level headings in the same document
"MD025": false,
// Allow bare URLs.
"MD034": false,
// MD041/first-line-heading/first-line-h1: First line in a file should be a top-level
"MD041": false
},
That should work. Please check if the folder in question has a .markdownlint.json (or similar) configuration file because that would override the user/workspace configuration above.
I can't believe I missed it! Sorry for the wasted time here.
In my defense I didn't create it as I'm using a forked repo - didn't notice it was there, but still should have checked.
Thanks for your work and effort put into this project. It is much appreciated!
I tried disabling MD025 in VSCode settings but it continues being reported in my markdown file. Other disabled rules are supressed as expected.