From 9c679f1bf3c6f0c7b3bad8316790eb203a851d8e Mon Sep 17 00:00:00 2001 From: luk3yx Date: Sat, 1 Feb 2020 12:24:50 +1300 Subject: [PATCH] Fix empty items in textlists. --- index.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.lua b/index.lua index 3f592e4..ccdfa03 100644 --- a/index.lua +++ b/index.lua @@ -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)