Skip to content

Commit 58db542

Browse files
committed
Ensure Spacing only flags terminal punctuation
Fixes #14.
1 parent 7c222bf commit 58db542

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Microsoft/Spacing.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ link: https://docs.microsoft.com/en-us/style-guide/punctuation/periods
44
level: error
55
nonword: true
66
tokens:
7-
- '[.?!] {2,}[A-Z]'
8-
- '[.?!][A-Z]'
7+
- '[a-z][.?!] {2,}[A-Z]'
8+
- '[a-z][.?!][A-Z]'

features/rules.feature

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,5 +153,5 @@ Feature: Rules
153153
When I test "Sentences"
154154
Then the output should contain exactly:
155155
"""
156-
test.md:5:22:Microsoft.Spacing:'. T' should have one space.
156+
test.md:5:21:Microsoft.Spacing:'y. T' should have one space.
157157
"""

fixtures/Sentences/test.md

+2
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
this is a sentence. so is this one.
44

55
This sentence is okay. This one is not.
6+
7+
The latest version of .NET Core is awesome!

0 commit comments

Comments
 (0)