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

Unexpected behavior with end-of-line tokens #892

Open micaswyers-work opened 3 months ago

micaswyers-work commented 3 months ago

Check for existing issues

Environment

Describe the bug / provide steps to reproduce it

Vale Studio Session: https://studio.vale.sh/s/d3c237c0d55224013966f836931cb453

Based on the tokens I've created, I would expect on line 6 the final "and" to be flagged by Vale. It is instead flagging an earlier, non-final, instance of "and."

When I open this session in regex101, it creates this pattern (?i)(?m)(?:and$|or$|[;,]$), and the pattern-matching works as expected, flagging the final "and".

This seems related possibly to Issue 646. Screenshot 2024-08-28 at 18 52 19

Thank you!