diff options
| author | onefang | 2026-02-05 12:38:01 +1000 |
|---|---|---|
| committer | onefang | 2026-02-05 12:38:01 +1000 |
| commit | 38e8fef497ba4205eab7c544380e693467aef67b (patch) | |
| tree | c551a52ac691028a21aeb1758df5868b6851c86c | |
| parent | More DocuWiki stuff. (diff) | |
| download | notYetAnotherWiki-38e8fef497ba4205eab7c544380e693467aef67b.zip notYetAnotherWiki-38e8fef497ba4205eab7c544380e693467aef67b.tar.gz notYetAnotherWiki-38e8fef497ba4205eab7c544380e693467aef67b.tar.bz2 notYetAnotherWiki-38e8fef497ba4205eab7c544380e693467aef67b.tar.xz | |
Whitespace++
| -rwxr-xr-x | notYetAnotherWiki.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/notYetAnotherWiki.lua b/notYetAnotherWiki.lua index 355af99..f082eba 100755 --- a/notYetAnotherWiki.lua +++ b/notYetAnotherWiki.lua | |||
| @@ -112,7 +112,8 @@ local toFile = function(name, key, value) | |||
| 112 | Context = Files[name] | 112 | Context = Files[name] |
| 113 | body = h:read('*a') ; h:close() | 113 | body = h:read('*a') ; h:close() |
| 114 | -- Deal with my typical double spaced sentence endings, and other things. | 114 | -- Deal with my typical double spaced sentence endings, and other things. |
| 115 | local result = RE.compile( [=[{~ | 115 | local result = RE.compile( [=[ |
| 116 | {~ | ||
| 116 | ( | 117 | ( |
| 117 | {[.?!]{" "}} -> '%1 ' / -- ' ' gets turned into hex 0xA0 by parse(). So feed it another metadata token that gets translated to . Seems we now skip this issue. | 118 | {[.?!]{" "}} -> '%1 ' / -- ' ' gets turned into hex 0xA0 by parse(). So feed it another metadata token that gets translated to . Seems we now skip this issue. |
| 118 | {[\\]{['"|$]}} -> '%2' / -- Do the same for fixing the \' \" \| etc mess pandoc left. | 119 | {[\\]{['"|$]}} -> '%2' / -- Do the same for fixing the \' \" \| etc mess pandoc left. |
| @@ -285,7 +286,8 @@ for l in io.popen('find -L ' .. Folder .. ' -name unsorted -prune -o -name "*.md | |||
| 285 | end | 286 | end |
| 286 | dst = string.rep('../', cnt) .. dst | 287 | dst = string.rep('../', cnt) .. dst |
| 287 | a:write( | 288 | a:write( |
| 288 | [=[<!DOCTYPE html> | 289 | [=[ |
| 290 | <!DOCTYPE html> | ||
| 289 | <html> | 291 | <html> |
| 290 | <head><meta http-equiv="refresh" content="0; url=]=] .. dst .. '"' .. [=[/></head> | 292 | <head><meta http-equiv="refresh" content="0; url=]=] .. dst .. '"' .. [=[/></head> |
| 291 | <body><p>Click this if you don't get redirected to the real page - <a href="]=] .. dst .. '"' .. [=[>Redirect</a></p></body> | 293 | <body><p>Click this if you don't get redirected to the real page - <a href="]=] .. dst .. '"' .. [=[>Redirect</a></p></body> |
| @@ -328,7 +330,8 @@ writeString(l .. '_ORIGINAL1', body) | |||
| 328 | beg, en = RE.find(body, [['<div class="foswikiAttachments foswikiFormStep" style="overflow:auto">']]) if nil ~= beg then body = body:sub(1, beg - 1) end | 330 | beg, en = RE.find(body, [['<div class="foswikiAttachments foswikiFormStep" style="overflow:auto">']]) if nil ~= beg then body = body:sub(1, beg - 1) end |
| 329 | beg, en = RE.find(body, [['<div class="foswikiSearchResultsPager">']]) if nil ~= beg then body = body:sub(1, beg - 1) end | 331 | beg, en = RE.find(body, [['<div class="foswikiSearchResultsPager">']]) if nil ~= beg then body = body:sub(1, beg - 1) end |
| 330 | -- Some clean ups. | 332 | -- Some clean ups. |
| 331 | local result = RE.compile( [[{~ | 333 | local result = RE.compile( [[ |
| 334 | {~ | ||
| 332 | ( | 335 | ( |
| 333 | {'class="foswikiCurrentTopicLink"'} -> blank / | 336 | {'class="foswikiCurrentTopicLink"'} -> blank / |
| 334 | {'class="foswikiNewLink"'} -> blank / | 337 | {'class="foswikiNewLink"'} -> blank / |
