diff --git a/block.go b/block.go index 0b5510d4..9cf451f0 100644 --- a/block.go +++ b/block.go @@ -1244,6 +1244,12 @@ gatherlines: line = i } + // If reached end of data, the Renderer.ListItem call we're going to make below + // is definitely the last in the list. + if line >= len(data) { + *flags |= LIST_ITEM_END_OF_LIST + } + rawBytes := raw.Bytes() // render the contents of the list item