diff options
author | dvs1 | 2025-01-18 17:23:15 +1000 |
---|---|---|
committer | dvs1 | 2025-01-18 17:23:15 +1000 |
commit | 79a6c1b38cf8526235f40360374ac4c102af0f07 (patch) | |
tree | ecda598e7fc3705fc8ee0fd8e73fd89a9a742539 | |
parent | Oops--. (diff) | |
download | notYetAnotherWiki-79a6c1b38cf8526235f40360374ac4c102af0f07.zip notYetAnotherWiki-79a6c1b38cf8526235f40360374ac4c102af0f07.tar.gz notYetAnotherWiki-79a6c1b38cf8526235f40360374ac4c102af0f07.tar.bz2 notYetAnotherWiki-79a6c1b38cf8526235f40360374ac4c102af0f07.tar.xz |
Use cmake-gfm to parse the body for Foswiki.
Now tables work.
-rwxr-xr-x | SuckItFos | 4 | ||||
-rwxr-xr-x | notYetAnotherWiki.lua | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -51,8 +51,10 @@ do | |||
51 | -e 's/^rel="nofollow"\}//g' \ | 51 | -e 's/^rel="nofollow"\}//g' \ |
52 | -e 's/rel=“nofollow”\}$//g' \ | 52 | -e 's/rel=“nofollow”\}$//g' \ |
53 | -e '/^:::/d' | 53 | -e '/^:::/d' |
54 | echo -e "****\n[Original page](${URL}/${base}/${file}) where you can edit it." >> Foswiki/${base}/${file}.md | ||
54 | 55 | ||
55 | echo "<hr/><p><a href=\"${URL}/${base}/${file}\">Original page</a> where you can edit it.</p>" >> Foswiki/${base}/${file}.md | 56 | # pandoc -t html -f commonmark_x --self-contained Foswiki/${base}/${file}.md > Foswiki//${base}/${file}.htm |
57 | cmark-gfm -t html -e footnotes -e table -e strikethrough Foswiki/${base}/${file}.md > Foswiki//${base}/${file}.body | ||
56 | done | 58 | done |
57 | 59 | ||
58 | notYetAnotherWiki.lua | 60 | 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 | |||
97 | Files[name] = nil | 97 | Files[name] = nil |
98 | else | 98 | else |
99 | -- Ordinary md file, stash it's metadata and parsed body. | 99 | -- Ordinary md file, stash it's metadata and parsed body. |
100 | h = io.open(name .. '.body', 'r') | ||
101 | if nil ~= h then body = h:read('*a') ; h:close() end | ||
100 | file.metadata = metadata | 102 | file.metadata = metadata |
101 | file.body = body | 103 | file.body = body |
102 | table.insert(Subs[path].files, bit) | 104 | table.insert(Subs[path].files, bit) |