Markdown: preformatted text inside lists is rendered inconsistently
-
Greetings,
It seems the Markdown implementation at WordPress.com has trouble with consistently rendering lists (both ordered and unordered) with items containing both ‘normal’ and preformatted text. Specifically, for some list items the ‘normal’ text is enclosed in <p></p>, while for others it isn’t. This results in varying space between the ‘normal’ text and the preformatted text.
Consider this article for example: https://kempniu.wordpress.com/2008/11/28/changing-ip-addresses-on-a-pix/ – items 1, 5 and 6 have no spacing between the ‘normal’ text and the preformatted text, while items 3 and 4 look as one would expect. Here is the Markdown source of that article: http://pastebin.com/VWQJyNuB
I tried everything I could, including replacing spaces with tabs and using explicit
blocks, but nothing allowed me to reproducibly achieve the correct rendering. I believe my Markdown is correct, because:
* I’m following the guidelines from https://daringfireball.net/projects/markdown/syntax, specifically: ‘To put a code block within a list item, the code block needs to be indented twice — 8 spaces or two tabs’,
* I checked some other Markdown processors out there and none of them suffers from this issue.Could anyone please comment on the above?
As a side note, the entry for preformatted text at https://en.support.wordpress.com/markdown-quick-reference/ seems to be wrong as two spaces at the beginning of the line is not enough for it to be treated as preformatted text (four is the minimum).
The blog I need help with is: (visible only to logged in users)
-
It seems the forum processes some HTML tags, so to clarify: I tried using explicit (pre)(code)(/code)(/pre) blocks.
- The topic ‘Markdown: preformatted text inside lists is rendered inconsistently’ is closed to new replies.