File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ const listItemLinkNodeWhitelist = new Set([
28
28
const listItemDescriptionNodeWhitelist = new Set ( [
29
29
'emphasis' ,
30
30
'footnoteReference' ,
31
+ 'html' ,
32
+ 'image' ,
31
33
'inlineCode' ,
32
34
'link' ,
33
35
'linkReference' ,
@@ -38,6 +40,8 @@ const listItemDescriptionNodeWhitelist = new Set([
38
40
// Valid node types in list item description suffix
39
41
const listItemDescriptionSuffixNodeWhitelist = new Set ( [
40
42
'emphasis' ,
43
+ 'html' ,
44
+ 'image' ,
41
45
'link' ,
42
46
'strong' ,
43
47
'text'
@@ -168,7 +172,7 @@ function validateListItemDescription(description, file) {
168
172
}
169
173
170
174
// Ensure description ends with '.', '!', '?' or an acceptable special-case
171
- if ( ! validateListItemSuffix ( descriptionText , suffixText ) ) {
175
+ if ( suffix . type === 'text' && ! validateListItemSuffix ( descriptionText , suffixText ) ) {
172
176
file . message ( 'List item description must end with proper punctuation' , suffix ) ;
173
177
return false ;
174
178
}
Original file line number Diff line number Diff line change @@ -4,11 +4,14 @@ All list-items in this document should be linted as **valid**.
4
4
- [ foo] ( https://foo.com ) - A valid description.
5
5
- [ foo] ( https://foo.com ) - A valid description...
6
6
- [ foo] ( https://foo.com ) - A valid description!
7
+ - [ foo] ( https://foo.com ) - A valid description! ⭐
7
8
- [ foo] ( https://foo.com ) - A valid description!!!
8
9
- [ foo] ( https://foo.com ) - A valid description?
9
10
- [ foo] ( https://foo.com ) - A valid description???
10
11
- [ foo] ( https://foo.com ) - A valid description????!??
11
12
- [ foo] ( https://foo.com ) - A valid description with [ link] ( http://bar.org ) .
13
+ - [ foo] ( https://foo.com ) - A valid description. ![ image] ( image.png )
14
+ - [ foo] ( https://foo.com ) - A valid description. <img src =" image.png " >
12
15
- [ foo] ( https://foo.com ) - ` valid description ` here.
13
16
- [ foo] ( https://foo.com ) - ` valid description ` .
14
17
- [ foo] ( https://foo.com ) - VaLid description.
You can’t perform that action at this time.
0 commit comments