Closed boardfish closed 2 years ago
Could you add a few tests to Contractions/test.md?
Essentially just sentences that should either pass or fail the rule.
@jdkato I've added tests. There's a small catch - I was unable to get it to error if a sentence ends with a contraction.
I've also realized that most of the other mappings listed would probably have valid sentences that can trigger issues, so I'll work through those too.
The tests marked with a TODO comment don't yet pass. I'll read around, but if there's anything anyone knows about how Vale handles regex that's stopping me from using those positive lookaheads, please let me know 🙏
Everything looks okay on my end -- the TODOs are passing for me:
So, I'm going to go ahead and merge this.
Thanks for your work here!
Thanks to @Spone for this.
In a sentence like "We appreciate all contributions, no matter how small they are.", Vale (backed by this repo) would suggest replacing
they are
withthey're
, resulting in the slightly awkward "no matter how small they're." This PR aims to fix that with a negative lookahead that ensures "they are" isn't followed by a period marking the end of the sentence.Do we also want to include other symbols that can end sentences (
?
!
) in the regex?