Skip to content

Commit ecdd53d

Browse files
committed
starting to improve english typos
1 parent 114af3a commit ecdd53d

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

src/Microdown-Rules/MicEnglishTypoChecker.class.st

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,28 @@ Class {
66
#tag : 'EnglishTypos'
77
}
88

9+
{ #category : 'visiting - inline elements' }
10+
MicEnglishTypoChecker >> visitCode: aCodeBlock [
11+
"for a code block we only check the caption"
12+
self flag: #writeATest.
13+
14+
('* ;*' match: aCodeBlock caption)
15+
ifTrue: [
16+
results add: (MicSpaceBeforeDiacriticsResult new
17+
micElement: aCodeBlock;
18+
inFile: aCodeBlock fromFile;
19+
detail: 'There is a space before ;';
20+
yourself) ].
21+
22+
]
23+
24+
{ #category : 'visiting - inline elements' }
25+
MicEnglishTypoChecker >> visitMonospace: aCodeBlock [
26+
"We do not check monospae code because `[ :each |` is not a problem"
27+
28+
self flag: #writeATest
29+
]
30+
931
{ #category : 'visiting - inline elements' }
1032
MicEnglishTypoChecker >> visitText: aText [
1133

@@ -15,6 +37,13 @@ MicEnglishTypoChecker >> visitText: aText [
1537
micElement: aText;
1638
inFile: aText fromFile;
1739
detail: 'There is a space before ;';
40+
yourself) ].
41+
('* :*' match: aText bodyString)
42+
ifTrue: [
43+
results add: (MicSpaceBeforeDiacriticsResult new
44+
micElement: aText;
45+
inFile: aText fromFile;
46+
detail: 'There is a space before :';
1847
yourself) ]
1948

2049
]

0 commit comments

Comments
 (0)