Convert markdown to mediawiki with pandoc

From Qiki
Revision as of 22:36, 5 June 2025 by Ryan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Install

brew install pandoc

Normal Usage

pandoc -f markdown -t mediawiki test.md -o test.wiki

Sometimes, the current version of MediaWiki can't display the <syntaxhighlight> tag. This could be a solution.

pandoc -f markdown -t mediawiki test.md | sed "s/<syntaxhighlight/\n<syntaxhighlight/" > test.wiki

https://pandoc.org/

https://pandoc.org/try/