Skip to content

Commit f062865

Browse files
authored
Add 'or' to OxfordComma regex (#29)
* Add 'or' to regex On 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. * Make the group non-capturing
1 parent cb401ea commit f062865

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Microsoft/OxfordComma.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ link: https://docs.microsoft.com/en-us/style-guide/punctuation/commas
44
scope: sentence
55
level: warning
66
tokens:
7-
- '(?:[^,]+,){1,}\s\w+\sand'
7+
- '(?:[^,]+,){1,}\s\w+\s(?:and|or)'

0 commit comments

Comments
 (0)