Update replace w/ '.html' filter

master
Hektor Misplon 2022-09-24 12:28:05 +02:00
parent 869eb017c4
commit 4733aef8d3
1 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,9 @@
-- https://stackoverflow.com/questions/40993488/convert-markdown-links-to-html-with-pandoc
function Link(el) function Link(el)
el.target = string.gsub(el.target, "%.md", ".html") --Replace markdown extension with html extension
if string.match(el.target, '.md$') then
el.target = string.gsub(el.target, "%.md", "")
--Add html extension
el.target = el.target .. '.html'
end
return el return el
end end