Skip to content

mediawiki reader: markup should be active in tt, code, and simple preformatted text #2607

Closed
stm2 opened this Issue · 1 comment

2 participants

@stm2
pandoc -f mediawiki -t html << EOF
<code>'''hello''' <br />world</code>
EOF

renders as

<p><code>'''hello''' &lt;br /&gt;world</code></p>

but should produce

<p><code><strong>hello</strong> <br />
world</code></p>

Character formatting is only inactive inside <pre> tags, see https://www.mediawiki.org/wiki/Help:Formatting

@jgm
Owner
jgm commented

Pandoc's Code and CodeBlock constructors only take a string as value, so you can't actually embed formatted text in them. We could work around this by turning

<code>'''hello''' <br />world</code>

into

[Strong [Code "hello"], Code " ", LineBreak, Code " world"]

but this is less straightforward to implement.

@jgm jgm added the bug label
@jgm jgm closed this in 75695b1
@c-forster c-forster pushed a commit to c-forster/pandoc that referenced this issue
@jgm MediaWiki reader: interpret markup inside `<tt>`, `<code>`.
Closes #2607.
24523f0
@c-forster c-forster pushed a commit to c-forster/pandoc that referenced this issue
@jgm MediaWiki reader: interpret markup inside `<tt>`, `<code>`.
Closes #2607.
cf48589
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.