From 080bf691c4a23d2b9d055864fee0a5cb0304f619 Mon Sep 17 00:00:00 2001 From: dvs1 Date: Sat, 15 Mar 2025 16:19:39 +1000 Subject: Yet another work around for what I think is a bug in Lunamark. The random list creation bug. --- notYetAnotherWiki.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'notYetAnotherWiki.lua') diff --git a/notYetAnotherWiki.lua b/notYetAnotherWiki.lua index 35c68a8..e1b1c37 100755 --- a/notYetAnotherWiki.lua +++ b/notYetAnotherWiki.lua @@ -791,8 +791,8 @@ for name, file in pairs(Files) do g = h h = RE.gsub(h, '{[ ]}', ' ') -- FIXME - Work around a bug in Lunamark? - g = RE.gsub(g, "{[\\]}", "") - h = RE.gsub(h, "{[\\]}", "") + g = RE.gsub(g, '{[\\]}', '') + h = RE.gsub(h, '{[\\]}', '') -- FIXME - if it's a linky, strip off the URL part. The Wiki audit has such things. metadata.menu = metadata.menu .. '
' .. string.rep(' ', l) .. '' .. h .. '
' end @@ -826,6 +826,7 @@ for name, file in pairs(Files) do -- Toss the body in first, so the scan can deal with it to. -- NOTE - this is where we actually parse the markup into HTML. Context = file + body = RE.gsub(body, '{[%nl]^1[%a]+}[.]^1 ', '%1. ') -- Coz otherwise stray . trip up the list detection. local bd, md = Parse(body) -- The md is a table of extracted metadata, not likely to be any, and we wont do anything with it. bd = RE.gsub(bd, '{[%]}', '$perc$') -- Coz otherwise stray % trip up the capture part. temp = RE.gsub(temp, '"$body$"', bd) -- cgit v1.1