git.iko.soy/typeable/pandoc
on master help sign in
Dokuwiki reader: handle unknown interwiki links better.

DokuWiki lets the user define his own Interwiki links. Previously pandoc reacted to these by emitting a google search link, which is not helpful. Instead, we now just emit the full URL including the wikilink prefix, e.g. `faquk>FAQ-mathml`. This at least gives users the ability to modify the links using filters. Closes #6932.

commit501ea7f0c4735acdf1457da44fe04d811ac776d7 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 7 Dec 2020, 12:15 (6 years ago) parent810df00
1 file changed+1−1
src/Text/Pandoc/Readers/DokuWiki.hs+1−1
src/Text/Pandoc/Readers/DokuWiki.hs+1−1
@@ -317,7 +317,7 @@ interwikiToUrl "wpes" page = "https://es.wikipedia.org/wiki/" <> page
317317interwikiToUrl "wpfr" page = "https://fr.wikipedia.org/wiki/" <> page
318318interwikiToUrl "wpjp" page = "https://jp.wikipedia.org/wiki/" <> page
319319interwikiToUrl "wppl" page = "https://pl.wikipedia.org/wiki/" <> page
320−interwikiToUrl _ page = "https://www.google.com/search?q=" <> page <> "&btnI=lucky"
320+interwikiToUrl unknown page = unknown <> ">" <> page
321321
322322linkText :: PandocMonad m => DWParser m B.Inlines
323323linkText = parseLink fromRaw "[[" "]]"