Open
Description
Check for existing issues
- Completed
Environment
- OS: Linux, Debian 12.10
- Install method Conda
- 3.11.2 and 3.9.5 (Originally observed with version 3.9.5, reproduced with 3.11.2)
Describe the bug / provide steps to reproduce it
A word (TODO
) listed in the reject.txt
file is being flagged as an error despite being surrounded by vale off
and vale on
comments in a Markdown file.
The issue appears to occur if the word appears on the same line as a bold or italicized word.
ex:
*Note*: <!-- vale off -->TODO<!-- vale on -->
This is also flagged:
**Note**: <!-- vale off -->TODO<!-- vale on -->
as are these:
_Note_: <!-- vale off -->TODO<!-- vale on -->
__Note__: <!-- vale off -->TODO<!-- vale on -->
However this works as expected:
Note: This works as expected <!-- vale off -->TODO<!-- vale on -->
Full repro is available at: https://github.com/dagardner-nv/vale-off-test
Example output:
$ vale ./README.md
README.md
5:26 error Avoid using 'TODO'. Vale.Avoid
7:26 error Avoid using 'TODO'. Vale.Avoid
9:28 error Avoid using 'TODO'. Vale.Avoid
11:28 error Avoid using 'TODO'. Vale.Avoid
✖ 4 errors, 0 warnings and 0 suggestions in 1 file.
Possibly related to issues #340 & #878 however those were different enough that I decided to open an issue.