Fix empty items in textlists.

This commit is contained in:
luk3yx 2020-02-01 12:24:50 +13:00
parent 82b8901a76
commit 9c679f1bf3
1 changed files with 3 additions and 1 deletions

View File

@ -336,7 +336,9 @@ function elems.textlist(node)
local res = make('div')
for i, item in ipairs(node.listelem) do
local elem = make('div')
if item:sub(1, 1) ~= '#' then
if item == '' then
elem.innerHTML = ' '
elseif item:sub(1, 1) ~= '#' then
elem.textContent = item
elseif item:sub(2, 2) == '#' then
elem.textContent = item:sub(2)