errata-ai / vale

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

Support alternative inline configuration for Markdown #426

Closed andrewnicols closed 2 years ago

andrewnicols commented 2 years ago

The documentation for Markup-based configuration uses HTML-style comments as the comment style for markdown files, but these are then present in the output content.

The typical way to write comments in Markdown, such that they are not included in the output is with unused reference links:

[\\]: # (Comment here)

Here's an older discussion on the topic from 2014: https://stackoverflow.com/questions/4823468/comments-in-markdown

This seems to be the most widely supported way of adding markdown comments across multiple parsers.

I'd like to propose that Vale support these in addition to the existing methods:

[\\]: # (vale Style.Rule = ARGUMENT)
The content you would like to ignore
[\\]: # (vale Style.Rule = YES)
jdkato commented 2 years ago

Vale operates on the converted HTML rather than the Markdown source itself.

So, the problem here is that Vale actually requires that comments be passed through to the output.

If you need to add an exception and don't want to use comments, you can probably do so using either a Vocab file or an ignore pattern.