File tree 4 files changed +81
-11
lines changed
4 files changed +81
-11
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,11 @@ export default function retextSyntaxUrls() {
147
147
}
148
148
}
149
149
150
+ // Exit if the TLD is only 1 character long.
151
+ if ( toString ( siblings . slice ( index + 1 , end + 1 ) ) . length === 1 ) {
152
+ return
153
+ }
154
+
150
155
/** @type {Source } */
151
156
const replacement = { type : 'SourceNode' , value : toString ( nodes ) }
152
157
const initial = pointStart ( nodes [ 0 ] )
Original file line number Diff line number Diff line change 35
35
"dependencies" : {
36
36
"@types/nlcst" : " ^1.0.0" ,
37
37
"@types/unist" : " ^2.0.0" ,
38
- "ccount" : " ^2.0.1 " ,
38
+ "ccount" : " ^2.0.0 " ,
39
39
"nlcst-to-string" : " ^3.0.0" ,
40
40
"unified" : " ^10.0.0" ,
41
41
"unist-util-modify-children" : " ^3.0.0" ,
Original file line number Diff line number Diff line change 1
- (e.g. dmeshuang @yahoo.com)
1
+ (e.g. xxxxxxxxx @yahoo.com)
Original file line number Diff line number Diff line change 8
8
"type" : " SentenceNode" ,
9
9
"children" : [
10
10
{
11
- "type" : " SourceNode " ,
12
- "value" : " (e.g " ,
11
+ "type" : " PunctuationNode " ,
12
+ "value" : " (" ,
13
13
"position" : {
14
14
"start" : {
15
15
"line" : 1 ,
18
18
},
19
19
"end" : {
20
20
"line" : 1 ,
21
- "column" : 5 ,
22
- "offset" : 4
21
+ "column" : 2 ,
22
+ "offset" : 1
23
23
}
24
24
}
25
25
},
26
26
{
27
- "type" : " PunctuationNode" ,
28
- "value" : " ." ,
27
+ "type" : " WordNode" ,
28
+ "children" : [
29
+ {
30
+ "type" : " TextNode" ,
31
+ "value" : " e" ,
32
+ "position" : {
33
+ "start" : {
34
+ "line" : 1 ,
35
+ "column" : 2 ,
36
+ "offset" : 1
37
+ },
38
+ "end" : {
39
+ "line" : 1 ,
40
+ "column" : 3 ,
41
+ "offset" : 2
42
+ }
43
+ }
44
+ },
45
+ {
46
+ "type" : " PunctuationNode" ,
47
+ "value" : " ." ,
48
+ "position" : {
49
+ "start" : {
50
+ "line" : 1 ,
51
+ "column" : 3 ,
52
+ "offset" : 2
53
+ },
54
+ "end" : {
55
+ "line" : 1 ,
56
+ "column" : 4 ,
57
+ "offset" : 3
58
+ }
59
+ }
60
+ },
61
+ {
62
+ "type" : " TextNode" ,
63
+ "value" : " g" ,
64
+ "position" : {
65
+ "start" : {
66
+ "line" : 1 ,
67
+ "column" : 4 ,
68
+ "offset" : 3
69
+ },
70
+ "end" : {
71
+ "line" : 1 ,
72
+ "column" : 5 ,
73
+ "offset" : 4
74
+ }
75
+ }
76
+ },
77
+ {
78
+ "type" : " PunctuationNode" ,
79
+ "value" : " ." ,
80
+ "position" : {
81
+ "start" : {
82
+ "line" : 1 ,
83
+ "column" : 5 ,
84
+ "offset" : 4
85
+ },
86
+ "end" : {
87
+ "line" : 1 ,
88
+ "column" : 6 ,
89
+ "offset" : 5
90
+ }
91
+ }
92
+ }
93
+ ],
29
94
"position" : {
30
95
"start" : {
31
96
"line" : 1 ,
32
- "column" : 5 ,
33
- "offset" : 4
97
+ "column" : 2 ,
98
+ "offset" : 1
34
99
},
35
100
"end" : {
36
101
"line" : 1 ,
57
122
},
58
123
{
59
124
"type" : " SourceNode" ,
60
- "value" : " dmeshuang @yahoo.com" ,
125
+ "value" : " xxxxxxxxx @yahoo.com" ,
61
126
"position" : {
62
127
"start" : {
63
128
"line" : 1 ,
You can’t perform that action at this time.
0 commit comments