-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only correct "they are" if it isn't at the end of a sentence #40
Conversation
Co-authored-by: Hans Lemuet <[email protected]>
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 🙏 |
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?