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 | |
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.
-rw-r--r-- | TODO.md | 2 | ||||
-rwxr-xr-x | notYetAnotherWiki.lua | 5 | ||||
-rw-r--r-- | testing/index.md | 6 |
3 files changed, 8 insertions, 5 deletions
@@ -5,8 +5,6 @@ Make it perphekd! | |||
5 | ## Do these | 5 | ## Do these |
6 | 6 | ||
7 | 7 | ||
8 | 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. | ||
9 | |||
10 | Add atom feed for single page. Alas cgit only seems to have ATOM feed on the whole repo, not individual files. | 8 | Add atom feed for single page. Alas cgit only seems to have ATOM feed on the whole repo, not individual files. |
11 | 9 | ||
12 | - git.devuan.org might have usable per page history. | 10 | - 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 | |||
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) |
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 | |||
84 | 84 | ||
85 | Bug. If there's a single word and period at the beginning of a line, it gets turned into a list, or list item. | 85 | Bug. If there's a single word and period at the beginning of a line, it gets turned into a list, or list item. |
86 | 86 | ||
87 | <!-- Separate the lists. --> | ||
88 | |||
89 | Bug. If there's a single word and period at the beginning of a line, it gets turned into a list, or list item. | ||
90 | |||
87 | ~~~ | 91 | ~~~ |
88 | Bug. If there's a single word and period at the beginning of a line, it gets turned into a list, or list item. | 92 | Bug. If there's a single word and period at the beginning of a line, it gets turned into a list, or list item. |
89 | ~~~ | 93 | ~~~ |
90 | 94 | ||
91 | Uncovering another bug, the stuff in a code block is in a different font. Ah, it's mono. lol | 95 | The stuff in a code block is in a different font, it's mono. lol |
92 | 96 | ||
93 | # images | 97 | # images |
94 | 98 | ||