@@ -66,7 +66,7 @@ test('core', function (t) {
66
66
]
67
67
} ) ,
68
68
'a\n\n*\n\n<!---->\n\n*\n\n1.\n\n<!---->\n\n1.\n\nd\n' ,
69
- 'should inject HTML comments between lists w/ the same ordered as they’d otherwise run into each other '
69
+ 'should inject HTML comments between lists w/ the same marker '
70
70
)
71
71
72
72
t . equal (
@@ -79,7 +79,96 @@ test('core', function (t) {
79
79
]
80
80
} ) ,
81
81
' a\n\n*\n\n<!---->\n\n b\n' ,
82
- 'should inject HTML comments between lists and an indented code as they’d otherwise run into each other'
82
+ 'should inject HTML comments between lists and an indented code'
83
+ )
84
+
85
+ t . equal (
86
+ to ( {
87
+ type : 'root' ,
88
+ children : [
89
+ { type : 'code' , value : 'a' } ,
90
+ { type : 'code' , value : 'b' }
91
+ ]
92
+ } ) ,
93
+ ' a\n\n<!---->\n\n b\n' ,
94
+ 'should inject HTML comments between adjacent indented code'
95
+ )
96
+
97
+ t . equal (
98
+ to ( {
99
+ type : 'root' ,
100
+ children : [
101
+ {
102
+ type : 'blockquote' ,
103
+ children : [
104
+ { type : 'paragraph' , children : [ { type : 'text' , value : 'a' } ] }
105
+ ]
106
+ } ,
107
+ {
108
+ type : 'blockquote' ,
109
+ children : [
110
+ { type : 'paragraph' , children : [ { type : 'text' , value : 'b' } ] }
111
+ ]
112
+ }
113
+ ]
114
+ } ) ,
115
+ '> a\n\n<!---->\n\n> b\n' ,
116
+ 'should inject HTML comments between two block quotes'
117
+ )
118
+
119
+ t . equal (
120
+ to ( {
121
+ type : 'listItem' ,
122
+ spread : false ,
123
+ children : [
124
+ { type : 'paragraph' , children : [ { type : 'text' , value : 'a' } ] } ,
125
+ { type : 'paragraph' , children : [ { type : 'text' , value : 'b' } ] }
126
+ ]
127
+ } ) ,
128
+ '* a\n\n b\n' ,
129
+ 'should not honour `spread: false` for two paragraphs'
130
+ )
131
+
132
+ t . equal (
133
+ to ( {
134
+ type : 'listItem' ,
135
+ spread : false ,
136
+ children : [
137
+ { type : 'paragraph' , children : [ { type : 'text' , value : 'a' } ] } ,
138
+ { type : 'definition' , label : 'b' , url : 'c' }
139
+ ]
140
+ } ) ,
141
+ '* a\n\n [b]: c\n' ,
142
+ 'should not honour `spread: false` for a paragraph and a definition'
143
+ )
144
+
145
+ t . equal (
146
+ to ( {
147
+ type : 'listItem' ,
148
+ spread : false ,
149
+ children : [
150
+ { type : 'paragraph' , children : [ { type : 'text' , value : 'a' } ] } ,
151
+ { type : 'heading' , depth : 1 , children : [ { type : 'text' , value : 'b' } ] }
152
+ ]
153
+ } ) ,
154
+ '* a\n # b\n' ,
155
+ 'should honour `spread: false` for a paragraph and a heading'
156
+ )
157
+
158
+ t . equal (
159
+ to (
160
+ {
161
+ type : 'listItem' ,
162
+ spread : false ,
163
+ children : [
164
+ { type : 'paragraph' , children : [ { type : 'text' , value : 'a' } ] } ,
165
+ { type : 'heading' , depth : 1 , children : [ { type : 'text' , value : 'b' } ] }
166
+ ]
167
+ } ,
168
+ { setext : true }
169
+ ) ,
170
+ '* a\n\n b\n =\n' ,
171
+ 'should not honour `spread: false` for a paragraph and a setext heading'
83
172
)
84
173
85
174
t . throws (
0 commit comments