Skip to content
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

Oxford comma mistakenly suggested #20

Open
felicitymay opened this issue Jul 29, 2019 · 3 comments
Open

Oxford comma mistakenly suggested #20

felicitymay opened this issue Jul 29, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@felicitymay
Copy link

Sometimes, Vale suggests an Oxford comma when it isn't needed. For an example, see: https://gist.github.com/felicity-semmle/05e45ca77f168865819e70c47d7eee69.

I've tried rewording this to reduce the chances that Vale will flag it (previously it started: "In this case,") but that didn't work. I'm not sure that it's going to be possible to remove this false positive result, but thought I'd ask just in case. Feel free to close this if it's just not possible.

@jdkato jdkato added the enhancement New feature or request label Aug 2, 2019
@jdkato
Copy link
Member

jdkato commented Aug 2, 2019

Hmm -- I'm not sure.

It's possible we could employ some pattern-based heuristic, but it's not immediately clear to me what that might be. I've created a Regex101 test suite, if anyone wants to play around with the pattern.

That said, if you'd like to exclude these false positives without disabling the rule altogether, you can use an in-document comment.

jdkato added a commit that referenced this issue Oct 12, 2020
@aireilly
Copy link

aireilly commented Jun 16, 2023

Note the Oxford comma rule in the referenced commit above only catches errors at the end of the sentence. See https://github.com/redhat-documentation/vale-at-red-hat/pull/569/files#diff-4d1c06a8fa11acc150e3e25b3ba89b4438b7650bbccd180de752d8aacfb0534fR8

https://regex101.com/r/Qav0Jg/1

@aireilly
Copy link

Updated in #53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants