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. --- TODO.md | 2 -- notYetAnotherWiki.lua | 5 +++-- testing/index.md | 6 +++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/TODO.md b/TODO.md index 61a2699..1e5c17a 100644 --- a/TODO.md +++ b/TODO.md @@ -5,8 +5,6 @@ Make it perphekd! ## Do these -FIXTHEM: If there's a single word and period at the beginning of a line, it gets turned into a list, or list item by lunamark at the final Parse stage. - Add atom feed for single page. Alas cgit only seems to have ATOM feed on the whole repo, not individual files. - git.devuan.org might have usable per page history. 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) diff --git a/testing/index.md b/testing/index.md index 9866373..1833225 100644 --- a/testing/index.md +++ b/testing/index.md @@ -84,11 +84,15 @@ Bug. If there's a single word and period at the beginning of a line, it gets tur Bug. If there's a single word and period at the beginning of a line, it gets turned into a list, or list item. + + +Bug. If there's a single word and period at the beginning of a line, it gets turned into a list, or list item. + ~~~ Bug. If there's a single word and period at the beginning of a line, it gets turned into a list, or list item. ~~~ -Uncovering another bug, the stuff in a code block is in a different font. Ah, it's mono. lol +The stuff in a code block is in a different font, it's mono. lol # images -- cgit v1.1