$ ./vale test.md
test.md
2:2 error Did you really mean 'ona'? Vale.Spelling
✖ 1 error, 0 warnings and 0 suggestions in 1 file.
My expectation was no errors would be reported.
Remove the comment in the test document and no errors are reported.
The pattern seems to be that the non-comment characters on the first line, in this case on and a, will be flagged as a spelling error on their first usage after the comment. If you break the HTML comment, like this < !-- TODO -->, the unexpected behavior does not occur.
Another failing example is:
on <span/> a
sonata
By setting BlockIgnores = (?s) (<!--.*?-->)|(<[^>]+\/>) will workaround this issue. This does not, however, explain the unusual behavior where a portion of a valid word is flagged as a spelling error based on the preceding line.
Check for existing issues
Environment
Reproducible on:
Describe the bug / provide steps to reproduce it
With the default config:
This test document:
Triggers a spelling error:
My expectation was no errors would be reported.
Remove the comment in the test document and no errors are reported.
The pattern seems to be that the non-comment characters on the first line, in this case
on
anda
, will be flagged as a spelling error on their first usage after the comment. If you break the HTML comment, like this< !-- TODO -->
, the unexpected behavior does not occur.Another failing example is:
By setting
BlockIgnores = (?s) (<!--.*?-->)|(<[^>]+\/>)
will workaround this issue. This does not, however, explain the unusual behavior where a portion of a valid word is flagged as a spelling error based on the preceding line.