Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown to Mediawiki: escaped asterisk is not escaped #9700

Open
vadcx opened this issue Apr 27, 2024 · 1 comment
Open

Markdown to Mediawiki: escaped asterisk is not escaped #9700

vadcx opened this issue Apr 27, 2024 · 1 comment

Comments

@vadcx
Copy link

vadcx commented Apr 27, 2024

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

@vadcx vadcx added the bug label Apr 27, 2024
@jgm
Copy link
Owner

jgm commented Apr 28, 2024

It's an issue on the mediawiki writer side. The markdown reader correctly interprets * as a plain string, but the writer needs to add escaping in cases where something might be interpreted as a list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants