errata-ai / Microsoft

A Vale-compatible implementation of the Microsoft Writing Style Guide.
https://github.com/errata-ai/vale
MIT License
85 stars 46 forks source link

Add 'or' to OxfordComma regex #29

Closed tcmetzger closed 4 years ago

tcmetzger commented 4 years ago

In the examples in https://docs.microsoft.com/en-us/style-guide/punctuation/commas, the style guide explicitly mentions "and" and "or" as conjunctions requiring a serial comma. This pull request adds support for detecting "or" to the regex.

jdkato commented 4 years ago

This looks good, but could you please make the group non-capturing ((?:and|or))?