errata-ai / vale

:pencil: A markup-aware linter for prose built with speed and extensibility in mind.
https://vale.sh
MIT License
4.52k stars 155 forks source link

disable rule in markdown footnote? #927

Open adamwolf opened 5 days ago

adamwolf commented 5 days ago

Check for existing issues

Environment

macos 15.0.1 homebrew vale version 3.9.1

Describe the bug / provide steps to reproduce it

I don't know how to disable a style rule in a Markdown footnote.

An example:

Hello world[^tag]
<!-- vale Google.Contractions = NO -->

[^x]: They are footnotes.

<!-- vale Google.Contractions = YES -->

vale content/example.md

at 16:44:43 ❯ vale content/example.md

 content/example.md
 4:9  suggestion  Use 'they're' instead of 'They  Google.Contractions 
                  are'.                                               

✔ 0 errors, 0 warnings and 1 suggestion in 1 file.

Note that if I make the footnote not match, like this:

Hello world[^tag]
<!-- vale Google.Contractions = NO -->

[^foobar]: They are footnotes.

<!-- vale Google.Contractions = YES -->

or remove it altogether:

Hello world[^tag]
<!-- vale Google.Contractions = NO -->

They are footnotes.

<!-- vale Google.Contractions = YES -->

the styles are disabled as expected.

❯ vale content/example.md
✔ 0 errors, 0 warnings and 0 suggestions in 1 file.

I haven't yet dug into the source to see what's going on, and before I did that, I figured this might be something that's obvious to others. (and maybe I'm just missing something)

Thanks folks!