aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authordvs12025-03-15 15:21:01 +1000
committerdvs12025-03-15 15:21:01 +1000
commit1c2d41e3c4e3d551fa19346745d51b5e0c39252b (patch)
tree02e6b3575418e01f0835a4ac13d17ecefbba4b32
parentTODO-- (diff)
downloadnotYetAnotherWiki-1c2d41e3c4e3d551fa19346745d51b5e0c39252b.zip
notYetAnotherWiki-1c2d41e3c4e3d551fa19346745d51b5e0c39252b.tar.gz
notYetAnotherWiki-1c2d41e3c4e3d551fa19346745d51b5e0c39252b.tar.bz2
notYetAnotherWiki-1c2d41e3c4e3d551fa19346745d51b5e0c39252b.tar.xz
Work around a bug in Lunamark?
-rwxr-xr-xnotYetAnotherWiki.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/notYetAnotherWiki.lua b/notYetAnotherWiki.lua
index 974fde6..35c68a8 100755
--- a/notYetAnotherWiki.lua
+++ b/notYetAnotherWiki.lua
@@ -712,6 +712,8 @@ end
712 712
713function Writer.header(s, level) 713function Writer.header(s, level)
714 local text = Lunamark.util.rope_to_string(s) 714 local text = Lunamark.util.rope_to_string(s)
715-- FIXME - Work around a bug in Lunamark?
716 text = RE.gsub(text, "{[\\]}", "")
715 return '<h' .. level .. ' id="' .. RE.gsub(text, '{[ ]}', '_') .. '">' .. text .. ' <a style="font-size: 0.42em;" href="#top">👆</a></h' .. level .. '>' 717 return '<h' .. level .. ' id="' .. RE.gsub(text, '{[ ]}', '_') .. '">' .. text .. ' <a style="font-size: 0.42em;" href="#top">👆</a></h' .. level .. '>'
716end 718end
717local OgWriterLink = Writer.link -- So we can call the original from within mine, we are just changing the URL. 719local OgWriterLink = Writer.link -- So we can call the original from within mine, we are just changing the URL.
@@ -788,6 +790,9 @@ for name, file in pairs(Files) do
788 local l = string.len(g) - string.len(h) 790 local l = string.len(g) - string.len(h)
789 g = h 791 g = h
790 h = RE.gsub(h, '{[ ]}', '&nbsp;') 792 h = RE.gsub(h, '{[ ]}', '&nbsp;')
793-- FIXME - Work around a bug in Lunamark?
794 g = RE.gsub(g, "{[\\]}", "")
795 h = RE.gsub(h, "{[\\]}", "")
791-- 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.
792 metadata.menu = metadata.menu .. '<p>' .. string.rep('&nbsp;', l) .. '<a style="font-size: 0.80em;" href="#' .. RE.gsub(g, '{[ ]}', '_') .. '">' .. h .. '</a></p>' 797 metadata.menu = metadata.menu .. '<p>' .. string.rep('&nbsp;', l) .. '<a style="font-size: 0.80em;" href="#' .. RE.gsub(g, '{[ ]}', '_') .. '">' .. h .. '</a></p>'
793 end 798 end