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

--wrap=preserve breaks MediaWiki lists #3531

Closed
rohieb opened this issue Mar 26, 2017 · 1 comment
Closed

--wrap=preserve breaks MediaWiki lists #3531

rohieb opened this issue Mar 26, 2017 · 1 comment

Comments

@rohieb
Copy link
Contributor

rohieb commented Mar 26, 2017

I want to preserve line breaks wherever possible in the output file, so I'm using pandoc --wrap=preserve. This works as intended so far with MediaWiki as output format, until I try to use lazy line continuation for my list items in my Markdown input. The problem here is that those line breaks inside the list items get transferred 1:1 to the MediaWiki output, but unfortunately, MediaWiki interprets line breaks in list items as a new paragraph. (Line breaks inside paragraphs are okay.)

For illustration, consider this example, wrapped neatly to 40 characters:

* This is a list item.
* This is a list item in Markdown. It is
  continued in the next line.
    * It has a sub-item.
* This is the next list item.

A paragraph can span multiple lines
without being broken into pieces.

After $ pandoc --wrap=preserve -t mediawiki /tmp/linebreaks.markdown:

* This is a list item.
* This is a list item in Markdown. It is
continued in the next line.
** It has a sub-item.
* This is the next list item.

A paragraph can span multiple lines
without being broken into pieces.

The pandoc output is rendered by MediaWiki like this, the list is broken in between:
4e94bdf2-11d6-11e7-89f6-3b77a6f646de

I would expect that the MediaWiki writer can detect certain cases where the syntax of the output format does not allow line breaking, and suppress line breaks in these cases.

@jgm jgm closed this as completed in 358dfba Mar 26, 2017
jgm added a commit that referenced this issue Mar 26, 2017
@rohieb
Copy link
Contributor Author

rohieb commented Mar 27, 2017

Oh, that was quick! Thanks!

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

1 participant