Skip to content

Markdown to Mediawiki: escaped asterisk is not escaped #9700

Closed
@vadcx

Description

@vadcx

Explain the problem.

When converting Markdown -> Mediawiki, an escaped asterisk is not escaped in Mediawiki output, causing it to be interpreted as a formatting character in some cases, such as when starting on a line.

I don't know whether it's a problem on Markdown input or Mediawiki output side.

Online pandoc link

Command: pandoc -f markdown -t mediawiki markdown-to-mediawiki-asterisk-bug.md -o -

Input (markdown-to-mediawiki-asterisk-bug.md):

This is a normal sentence with a manual text footnote\*

\* The footnote explains why it couldn't just be inside parentheses

And the text continues. Although the "proper" footnote in Markdown has a different syntax.[^1]

[^1]: There's a reason I can never remember what all these different characters stand for.

End of text.

Output:

This is a normal sentence with a manual text footnote*

* The footnote explains why it couldn’t just be inside parentheses

And the text continues. Although the “proper” footnote in Markdown has a different syntax.<ref>There’s a reason I can never remember what all these different characters stand for.</ref>

End of text.

<references />

Will be displayed on MediaWiki as (it's not supposed to start a list!):


This is a normal sentence with a manual text footnote*

  • The footnote explains why it couldn’t just be inside parentheses

And the text continues. Although the “proper” footnote in Markdown has a different syntax.[1]

End of text.

[1]: There’s a reason I can never remember what all these different characters stand for.


I suppose it should've been enclosed in <nowiki> or something?

Pandoc version?

pandoc 3.1.8
Features: +server +lua
Scripting engine: Lua 5.4

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions