From 765ee49157a4c974f5dfa200f8f2ab84d836a9d6 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 30 Nov 2023 14:18:45 -1000 Subject: [PATCH] wikilinks: cleanup --- wikilinks.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wikilinks.lua b/wikilinks.lua index 693aaa7..cde68e8 100644 --- a/wikilinks.lua +++ b/wikilinks.lua @@ -9,9 +9,9 @@ -- - these do not find files across folders - correct path is required -- - these are not aware of file existence - targets should exist -function Link(elem) - if elem.title == "wikilink" then - t = elem.target .. "#" +function Link(el) + if el.title == "wikilink" then + t = el.target .. "#" t = t:gsub(" ", "-") -- t = t:gsub(t, "'", "") path, frag = t:match("([^#]*)#([^#]*)") @@ -27,7 +27,7 @@ function Link(elem) frag = pandoc.text.lower(frag) t = t .. "#" .. frag end - elem.target = t + el.target = t end - return elem + return el end