The corresponding Pandoc AST for the wiki-link ![[emanote-logo.svg]]
is: [Para [Link ("",[],[("data-wikilink-type","WikiLinkEmbed")]) [] ("emanote-logo.svg","")]]
. We can just pattern match on Link
and WikiLinkEmbed
to get emanote-logo.svg
(let's assume for simplicity that WikiLinkEmbed
only refers to static image files), but the problem here is that the relative URL is _emanote-static/emanote-logo.svg
which is obtained from siteRouteUrl function. I was considering to create a pandoc filter to fetch the siteRouteUrl
-- if there is no way to fetch it by reusing the function linked above --, is that the correct approach? @Srid
There are functions to parse and resolve wikilinks, https://github.com/srid/emanote/blob/30d3d084ddf551e131523b2c41c5a5ab49592848/emanote/src/Emanote/Pandoc/Renderer/Url.hs#L31-L34
Last updated: Nov 15 2024 at 12:33 UTC