From 192785cb14614758317d7a2e33c9851b71c69478 Mon Sep 17 00:00:00 2001 From: dvs1 Date: Mon, 17 Mar 2025 08:41:40 +1000 Subject: BUG-- upload and pub links are fixed again. --- TODO.md | 1 - notYetAnotherWiki.lua | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/TODO.md b/TODO.md index 00c03e8..226ff23 100644 --- a/TODO.md +++ b/TODO.md @@ -7,7 +7,6 @@ Make it perphekd! Fix up linky conversion. DONE, mostly. -- + BUG - broke images and other uploaded file linkies. The links are off by one. - This is the "page moved" problem, but now it's "page copied" and "page linked", a generic solution might work. - Rethink this, I might be going the wrong way. - Need to deal with real file name versus title. Also symlink name not matching what it points to. diff --git a/notYetAnotherWiki.lua b/notYetAnotherWiki.lua index 1cea01b..c5814f3 100755 --- a/notYetAnotherWiki.lua +++ b/notYetAnotherWiki.lua @@ -746,9 +746,9 @@ local lunaLinky = function(url) -- Fix up the links. url = xlnk .. string.gsub(ur, '.*%.', '', 1) -- end if 'PmWiki/uploads/' == p then - url = '../' .. p .. string.gsub(ur, '%.', '.', 1) + url = '../../' .. p .. string.gsub(ur, '%.', '.', 1) elseif 'Foswiki/pub/' == p then - url = '../' .. p .. ur + url = '../../' .. p .. ur else url = url .. '.HTML' end -- cgit v1.1