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