File tree 3 files changed +6
-4
lines changed
3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -122,8 +122,10 @@ func mergeListItemNodes(nodes []ast.Node) []ast.Node {
122
122
switch nodes [i ].(type ) {
123
123
case * ast.OrderedListItem :
124
124
listKind = ast .OrderedList
125
- case * ast.UnorderedListItem , * ast. TaskListItem :
125
+ case * ast.UnorderedListItem :
126
126
listKind = ast .UnorderedList
127
+ case * ast.TaskListItem :
128
+ listKind = ast .DescrpitionList
127
129
}
128
130
if prevResultNode == nil || prevResultNode .Type () != ast .ListNode || prevResultNode .(* ast.List ).Kind != listKind {
129
131
prevResultNode = & ast.List {
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ func TestParser(t *testing.T) {
174
174
},
175
175
},
176
176
& ast.List {
177
- Kind : ast .UnorderedList ,
177
+ Kind : ast .DescrpitionList ,
178
178
Children : []ast.Node {
179
179
& ast.TaskListItem {
180
180
Symbol : tokenizer .Hyphen ,
@@ -193,7 +193,7 @@ func TestParser(t *testing.T) {
193
193
text : "- [ ] hello\n - [x] world" ,
194
194
nodes : []ast.Node {
195
195
& ast.List {
196
- Kind : ast .UnorderedList ,
196
+ Kind : ast .DescrpitionList ,
197
197
Children : []ast.Node {
198
198
& ast.TaskListItem {
199
199
Symbol : tokenizer .Hyphen ,
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ func TestHTMLRenderer(t *testing.T) {
53
53
},
54
54
{
55
55
text : "- [ ] hello\n - [x] world" ,
56
- expected : `<ul ><li><input type="checkbox" disabled />hello</li><br><li><input type="checkbox" checked disabled />world</li></ul >` ,
56
+ expected : `<dl ><li><input type="checkbox" disabled />hello</li><br><li><input type="checkbox" checked disabled />world</li></dl >` ,
57
57
},
58
58
}
59
59
You can’t perform that action at this time.
0 commit comments