How would you compile links into pdf? #198
-
We can link Any ideas on how to approach this scenario? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @jorgemrisco! I was thinking about adding a command to compile the docs into vanilla markdown by rewriting wiki-links into regular markdown links, e.g.
Then you'd be able to feed the result of |
Beta Was this translation helpful? Give feedback.
-
While it may be trickier to convert the wikilinks, you can filter them out using lua filters for pandoc. Here is how I filter hashtags: -- hashtag-filter.lua
function Str(elem)
-- Check if the string starts with a hashtag
if elem.text:match("^#%w+") then
-- Replace the hashtag with an empty string
return pandoc.Str(elem.text:gsub("^#%w+", ""))
end
end To use this filter, save the Lua code to a file named pandoc input.md --lua-filter=hashtag-filter.lua -o output.html This command will convert |
Beta Was this translation helpful? Give feedback.
Hi @jorgemrisco! I was thinking about adding a command to compile the docs into vanilla markdown by rewriting wiki-links into regular markdown links, e.g.
Then you'd be able to feed the result of
marksman compile
intopandoc
. How does this sound?