1
0

don't remove ASCII apostrophe from link targets

This commit is contained in:
Simon Michael
2023-11-28 00:22:58 -10:00
parent 4cc0241f2b
commit 1c9196eded
3 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
-- Pandoc's wikilinks_title_after_pipe extension makes a start at linking
-- [[bracketed wiki links]]. This lua filter finishes the job and tries to
-- mimic Obsidian's wiki linking, by
-- - either hyphen-replacing or dropping all problem characters in the uri
-- - hyphen-replacing or dropping problem characters in the uri
-- - adding ".html" to the uri path
-- - preserving the uri fragment if any
-- - lower-casing the uri fragment
@@ -10,7 +10,7 @@ function Link(elem)
if elem.title == "wikilink" then
t = elem.target .. "#"
t = string.gsub(t, " ", "-")
t = string.gsub(t, "'", "")
-- t = string.gsub(t, "'", "")
path, frag = string.match(t, "([^#]*)#([^#]*)")
t = path
if string.len(path) > 0 then