processRawBlocks: cope with empty lists
This commit is contained in:
parent
c5747337a9
commit
722e122c88
11
markdown.go
11
markdown.go
@ -87,12 +87,13 @@ func (d *Doc) processRawBlocks(input *element) *element {
|
|||||||
current.children = nil
|
current.children = nil
|
||||||
listEnd := ¤t.children
|
listEnd := ¤t.children
|
||||||
for _, contents := range strings.Split(current.contents.str, "\001", -1) {
|
for _, contents := range strings.Split(current.contents.str, "\001", -1) {
|
||||||
list := d.parseMarkdown(contents)
|
if list := d.parseMarkdown(contents); list != nil {
|
||||||
*listEnd = list
|
*listEnd = list
|
||||||
for list.next != nil {
|
for list.next != nil {
|
||||||
list = list.next
|
list = list.next
|
||||||
|
}
|
||||||
|
listEnd = &list.next
|
||||||
}
|
}
|
||||||
listEnd = &list.next
|
|
||||||
}
|
}
|
||||||
current.contents.str = ""
|
current.contents.str = ""
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user