You can certainly define the markup rules in knitr
output hooks: http://yihui.name/knitr/hooks As one simple example, you can highlight source code with <syntaxhighlight>
:
knit_hooks$set(source = function(x, options) {
sprintf('<syntaxhighlight lang=%s>%s</syntaxhighlight>', options$engine, x)
})
You are free to design the rest of the output hooks. But as Ben Bolker pointed out, I think you are better off with Markdown, and convert that to Mediawiki via Pandoc.