When I convert the file
<div>
Some text
<ul>
<li>element</li>
</ul>
</div>
from html to pandoc markdown the result is
<div>
Some text - first
</div>
Which is then converted back to
<div>
<p>Some text - first</p>
</div>
This behavior is not expected by my side. I expect to get the same result. Or is this behavior expected? Then why? Cause the first code is valid, but pandoc represents content without list.
I can reproduce this issue. Minimal example:
$ pandoc -f native -t markdown
[ Plain [Str "Some",Space,Str "text"]
, BulletList [[Plain [Str "element"]]]
]
Some text
- element
The markdown writer should always put a blank line in front of a list.
@mb21 Please form sentences, I simply don't understand what you want.
@danieltuzes sorry, I edited my comment...
The markdown writer should always put a blank line in front of a list.
Not always...we don't want a blank line in front of a sublist in a tight nested list, for example.
@danieltuzes - what version of pandoc are you using?
With current HEAD we get different output (see @mb21's example), but there's still a problem because there's no blank line before the list.
I use pandoc 1.19.2.1 Compiled with pandoc-types 1.17.0.4, texmath 0.9, skylighting 0.1.1.4
Probably it would work to make the following transformation in the Markdown writer:
convert Plain before anything but a RawBlock to Para, unless (a) the following block is a list and (b) the immediate parent of the Plain element is a list.
@jgm Could you please inform me what do you suggest me to do? Or do you agree that this behavior in not intended and I shall wait for the next version of Pandoc?
It will be fixed in the next version.
+++ danieltuzes [Mar 08 17 03:52 ]:
[1]@jgm Could you please inform me what do you suggest me to do? Or do
you agree that this behavior in not intended and I shall wait for the
next version of Pandoc?—
You are receiving this because you were mentioned.
Reply to this email directly, [2]view it on GitHub, or [3]mute the
thread.References