Convert markdown to mediawiki with pandoc: Difference between revisions

From Qiki
Jump to navigation Jump to search
Created page with "Normal Usage<syntaxhighlight lang="bash"> pandoc -f markdown -t mediawiki test.md -o test.wiki </syntaxhighlight>Sometimes, the current version of MediaWiki can't display the <code><nowiki><syntaxhighlight></nowiki></code> tag. This could be a solution.<syntaxhighlight lang="bash"> pandoc -f markdown -t mediawiki test.md | sed "s/<syntaxhighlight/\n<syntaxhighlight/" > test.wiki </syntaxhighlight>https://pandoc.org/ https://pandoc.org/try/"
 
No edit summary
 
Line 1: Line 1:
Normal Usage<syntaxhighlight lang="bash">
Install<syntaxhighlight lang="bash">
brew install pandoc
</syntaxhighlight>Normal Usage<syntaxhighlight lang="bash">
pandoc -f markdown -t mediawiki test.md -o test.wiki
pandoc -f markdown -t mediawiki test.md -o test.wiki
</syntaxhighlight>Sometimes, the current version of MediaWiki can't display the <code><nowiki><syntaxhighlight></nowiki></code> tag.
</syntaxhighlight>Sometimes, the current version of MediaWiki can't display the <code><nowiki><syntaxhighlight></nowiki></code> tag.

Latest revision as of 22:36, 5 June 2025

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/