vale icon indicating copy to clipboard operation
vale copied to clipboard

How to fully ignore links into markdown

Open sw360cab opened this issue 5 months ago • 1 comments

I am using Vale for validating Markdown files. I want to exclude from Vale's validation the references I add at the bottom as bullet list of md links.

I have read #320, and I understood Vale is not validating the url part (brackets), but in my case I want to ignore also the content of square brackets. I tried many methods but the error from Vale is still there.

In particular I have tried writing a regular expressions

TokenIgnores = (\[.*\]\(.*\))

For regex101 it is a valid Group1 regexp Can you suggest me what is the correct way to achieve that?

sw360cab avatar Jul 18 '25 16:07 sw360cab

@sw360cab This isn't official, but one thing I've done for these situations is been explicit in my docs and use comments in the docs to control Vale.

If these are Markdown docs you can use vale off:

<!-- vale off -->

Links:
- [foobar](https://example.com)
- [blablablah](https://example.com)
...

<!-- vale on -->

You can also get specific with the rule you want to turn off:

<!-- vale Vale.Terms = NO -->
...

<!-- vale Vale.Terms = YES -->

That's how I've managed to do this. It's a bit of work to add the markup but it's nice that it's also clear that you're choosing to ignore sections of the content this way.

napcs avatar Aug 19 '25 17:08 napcs