diff options
author | dvs1 | 2025-03-15 16:19:39 +1000 |
---|---|---|
committer | dvs1 | 2025-03-15 16:19:39 +1000 |
commit | 080bf691c4a23d2b9d055864fee0a5cb0304f619 (patch) | |
tree | e470bef021dbf1441d86428dd57042d478645c37 /notYetAnotherWiki.lua | |
parent | Work around a bug in Lunamark? (diff) | |
download | notYetAnotherWiki-080bf691c4a23d2b9d055864fee0a5cb0304f619.zip notYetAnotherWiki-080bf691c4a23d2b9d055864fee0a5cb0304f619.tar.gz notYetAnotherWiki-080bf691c4a23d2b9d055864fee0a5cb0304f619.tar.bz2 notYetAnotherWiki-080bf691c4a23d2b9d055864fee0a5cb0304f619.tar.xz |
Yet another work around for what I think is a bug in Lunamark. The random list creation bug.
Diffstat (limited to 'notYetAnotherWiki.lua')
-rwxr-xr-x | notYetAnotherWiki.lua | 5 |
1 files changed, 3 insertions, 2 deletions
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 | |||
791 | g = h | 791 | g = h |
792 | h = RE.gsub(h, '{[ ]}', ' ') | 792 | h = RE.gsub(h, '{[ ]}', ' ') |
793 | -- FIXME - Work around a bug in Lunamark? | 793 | -- FIXME - Work around a bug in Lunamark? |
794 | g = RE.gsub(g, "{[\\]}", "") | 794 | g = RE.gsub(g, '{[\\]}', '') |
795 | h = RE.gsub(h, "{[\\]}", "") | 795 | h = RE.gsub(h, '{[\\]}', '') |
796 | -- FIXME - if it's a linky, strip off the URL part. The Wiki audit has such things. | 796 | -- FIXME - if it's a linky, strip off the URL part. The Wiki audit has such things. |
797 | metadata.menu = metadata.menu .. '<p>' .. string.rep(' ', l) .. '<a style="font-size: 0.80em;" href="#' .. RE.gsub(g, '{[ ]}', '_') .. '">' .. h .. '</a></p>' | 797 | metadata.menu = metadata.menu .. '<p>' .. string.rep(' ', l) .. '<a style="font-size: 0.80em;" href="#' .. RE.gsub(g, '{[ ]}', '_') .. '">' .. h .. '</a></p>' |
798 | end | 798 | end |
@@ -826,6 +826,7 @@ for name, file in pairs(Files) do | |||
826 | -- Toss the body in first, so the scan can deal with it to. | 826 | -- Toss the body in first, so the scan can deal with it to. |
827 | -- NOTE - this is where we actually parse the markup into HTML. | 827 | -- NOTE - this is where we actually parse the markup into HTML. |
828 | Context = file | 828 | Context = file |
829 | body = RE.gsub(body, '{[%nl]^1[%a]+}[.]^1 ', '%1. ') -- Coz otherwise stray . trip up the list detection. | ||
829 | 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. | 830 | 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. |
830 | bd = RE.gsub(bd, '{[%]}', '$perc$') -- Coz otherwise stray % trip up the capture part. | 831 | bd = RE.gsub(bd, '{[%]}', '$perc$') -- Coz otherwise stray % trip up the capture part. |
831 | temp = RE.gsub(temp, '"$body$"', bd) | 832 | temp = RE.gsub(temp, '"$body$"', bd) |