From 79a6c1b38cf8526235f40360374ac4c102af0f07 Mon Sep 17 00:00:00 2001 From: dvs1 Date: Sat, 18 Jan 2025 17:23:15 +1000 Subject: Use cmake-gfm to parse the body for Foswiki. Now tables work. --- SuckItFos | 4 +++- notYetAnotherWiki.lua | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/SuckItFos b/SuckItFos index 0f315b0..54fc376 100755 --- a/SuckItFos +++ b/SuckItFos @@ -51,8 +51,10 @@ do -e 's/^rel="nofollow"\}//g' \ -e 's/rel=“nofollow”\}$//g' \ -e '/^:::/d' + echo -e "****\n[Original page](${URL}/${base}/${file}) where you can edit it." >> Foswiki/${base}/${file}.md - echo "

Original page where you can edit it.

" >> Foswiki/${base}/${file}.md +# pandoc -t html -f commonmark_x --self-contained Foswiki/${base}/${file}.md > Foswiki//${base}/${file}.htm + cmark-gfm -t html -e footnotes -e table -e strikethrough Foswiki/${base}/${file}.md > Foswiki//${base}/${file}.body done notYetAnotherWiki.lua diff --git a/notYetAnotherWiki.lua b/notYetAnotherWiki.lua index c3db5f1..d592d06 100755 --- a/notYetAnotherWiki.lua +++ b/notYetAnotherWiki.lua @@ -97,6 +97,8 @@ for name, file in pairs(Files) do Files[name] = nil else -- Ordinary md file, stash it's metadata and parsed body. + h = io.open(name .. '.body', 'r') + if nil ~= h then body = h:read('*a') ; h:close() end file.metadata = metadata file.body = body table.insert(Subs[path].files, bit) -- cgit v1.1