From 1c9196eded1a8dbe8cd3bd8151a44c14cebf4ade Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 28 Nov 2023 00:22:58 -1000 Subject: [PATCH] don't remove ASCII apostrophe from link targets --- fixwikilinks.lua | 4 ++-- src/{Restricted-Stock-Units.md => Restricted-stock-units.md} | 0 ...-Rent-and-Utilities.md => Splitting-rent-and-utilities.md} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename src/{Restricted-Stock-Units.md => Restricted-stock-units.md} (100%) rename src/{Splitting-Rent-and-Utilities.md => Splitting-rent-and-utilities.md} (100%) diff --git a/fixwikilinks.lua b/fixwikilinks.lua index 9323ce8..015abf0 100644 --- a/fixwikilinks.lua +++ b/fixwikilinks.lua @@ -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 diff --git a/src/Restricted-Stock-Units.md b/src/Restricted-stock-units.md similarity index 100% rename from src/Restricted-Stock-Units.md rename to src/Restricted-stock-units.md diff --git a/src/Splitting-Rent-and-Utilities.md b/src/Splitting-rent-and-utilities.md similarity index 100% rename from src/Splitting-Rent-and-Utilities.md rename to src/Splitting-rent-and-utilities.md