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 writer: word wrap leads to spurious ordered list #1946

Closed
eisenstatdavid opened this issue Feb 16, 2015 · 9 comments
Closed

markdown writer: word wrap leads to spurious ordered list #1946

eisenstatdavid opened this issue Feb 16, 2015 · 9 comments
Labels

Comments

@eisenstatdavid
Copy link

$ cat >input.md
- blah blah blah blah blah blah blah blah blah blah blah blah blah 2015.
$ pandoc input.md -t html
<ul>
<li>blah blah blah blah blah blah blah blah blah blah blah blah blah 2015.</li>
</ul>
$ pandoc input.md -t markdown
-   blah blah blah blah blah blah blah blah blah blah blah blah blah
    2015.

$ pandoc input.md -t markdown | pandoc -f markdown -t html
<ul>
<li>blah blah blah blah blah blah blah blah blah blah blah blah blah
<ol start="2015" style="list-style-type: decimal">
<li></li>
</ol></li>
</ul>
@mpickering
Copy link
Collaborator

I think this is the expected behaviour? You can escape the . like so 2015\. if you don't want a nested ordered list.

@eisenstatdavid
Copy link
Author

Yes, that's what pandoc's markdown writer needs to do in this case.

@mpickering
Copy link
Collaborator

Ok, I misunderstood the problem sorry. Thanks for the report. I think this might be quite difficult to fix properly though.

@nkalvi
Copy link

nkalvi commented Feb 16, 2015

Sure it is a bug, but it is a bit 'unfair' to rewrite the md with pandoc without

--no-wrap
Disable text wrapping in output. By default, text is wrapped appropriately for the output format.

and feed it to itself. When

In standard markdown, enumerators are decimal numbers followed by a period and a space.

@eisenstatdavid
Copy link
Author

Perhaps using pandoc to reformat markdown is not an intended use, but this is a regression from previous versions. I'm already using --no-wrap as a workaround.

@nkalvi
Copy link

nkalvi commented Feb 16, 2015

Thanks for the clarifying.

@mpickering
Copy link
Collaborator

Seems like 3670dda got part of the way there.

@nkalvi
Copy link

nkalvi commented Feb 16, 2015

👍

@jgm
Copy link
Owner

jgm commented Feb 16, 2015

+++ Matthew Pickering [Feb 16 15 14:55 ]:

Seems like [1]3670dda got part of the way there.

Yep. I think that could be modified fairly easily to look
for ordered list markers too, though this might have a
fairly heavy performance cost.

@jgm jgm closed this as completed in 9a5e081 Feb 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants