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

MediaWiki reader chokes on quotes inside <tt> elements #3585

Closed
ktk opened this issue Apr 18, 2017 · 4 comments
Closed

MediaWiki reader chokes on quotes inside <tt> elements #3585

ktk opened this issue Apr 18, 2017 · 4 comments

Comments

@ktk
Copy link

ktk commented Apr 18, 2017

For MediaWiki to Markdown conversion there seems to be a problem with quotes.

I have in MediaWiki:

* Same but bzip2 it and nice it <tt>zfs send tank/storage/data/svn@daily-2014-03-20_00.00.00--2w | nice -15 bzip2 | ssh [email protected] "> /storage/c-3po/tank-storage-data-svn.dmp.bz2"</tt>

When I convert that to Markdown I get:

-   Same but bzip2 it and nice it `zfs send tank/storage/data/svn@daily-2014-03-20_00.00.00--2w | nice -15 bzip2 | ssh [email protected] `“`>`` ``/storage/c-3po/tank-storage-data-svn.dmp.bz2`”

At one point it seems to get confused by the double-quote in there and breaks the command.

@mb21
Copy link
Collaborator

mb21 commented Apr 19, 2017

A more minimal example is:

echo '<tt>">"</tt>' | pandoc -f mediawiki -t native
[Para [Quoted DoubleQuote [Code ("",[],[]) ">"]]]

Somehow the <tt> code tags don't take precedence over the quotes as they should, expected output:

[Para [Code ("",[],[]) "\">\""]]

@mb21 mb21 changed the title MediaWiki to Markdown seems to interpret <tt> blocks MediaWiki reader chokes on quotes inside <tt> elements Apr 19, 2017
@jgm
Copy link
Owner

jgm commented May 24, 2017

I'm inclined to close this. Formatting is supposed to be interpreted inside <tt>. We can't literally include a DoubleQuoted in a <tt>, so this is the best we can do. Of course, this doesn't match MediaWiki's own interpretation, but that's because MediaWiki doesn't have smart punctuation by default.

I would just suggest that we change the default extensions on the MediaWiki reader so that smart punctuation is not enabled.

@jgm
Copy link
Owner

jgm commented May 25, 2017

Actually, I'll also fix it so that, even with smart enabled, double quotes aren't transformed inside tt elements.

jgm added a commit that referenced this issue May 25, 2017
@ktk
Copy link
Author

ktk commented May 25, 2017

tnx @jgm will check that out in the next release

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

3 participants