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

Bold/italics not converted properly when starting or ending with space #6993

Closed
ripperdoc opened this issue Dec 30, 2020 · 2 comments
Closed

Comments

@ripperdoc
Copy link

ripperdoc commented Dec 30, 2020

Pandoc 2.11.2

I found that the bold and italics tags in Mediawiki are not recognized if the text they envelop start or end with whitespace.

So:

pandoc -f mediawiki -t html <<< "'''Should be bold '''"
<p>'''Should be bold '''</p>

pandoc -f mediawiki -t html <<< "''' Should be bold'''"
<p><em>' Should be bold</em>'</p>

pandoc -f mediawiki -t html <<< "'''Should be bold'''"
<p><strong>Should be bold</strong></p>

I've seen this quite often in Mediawikis in the wild.

@jgm
Copy link
Owner

jgm commented Dec 30, 2020

We have a check for a nonspace in the code. I'm not sure why it's there, but very possibly someone used a parser for another format as a base in constructing this. We could take it out, if you can confirm that mediawiki doesn't care about the space after the opening delimiter.

@ripperdoc
Copy link
Author

At least if I try in their test editor here (using the Source mode, not Visual), it correctly formats the word regardless of leading or trailing space.

@jgm jgm closed this as completed in 23f964b Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants