You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some text
* **Example**
This should be part of the list element
* **Other example**
But it's not in to python-markdown :/
* **list element**
Instead it's a separate list!
End text
I expect it to render like this:
Some text
Example
This should be part of the list element
Other example
But it's not in to python-markdown :/
list element
Instead it's a separate list!
End text
But python-markdown gives this to me:
<p>Some text</p>
<ul>
<li><strong>Example</strong></li>
</ul>
<p>This should be part of the list element</p>
<ul>
<li><strong>Other example</strong></li>
</ul>
<p>But it's not in to python-markdown :/</p>
<ul>
<li><strong>list element</strong></li>
</ul>
<p>Instead it's a separate list!</p>
<p>End text</p>
<p>Some text</p>
<ul>
<li><p><strong>Example</strong></p>
<p>This should be part of the list element</p></li>
<li><p><strong>Other example</strong></p>
<p>But it's not in to python-markdown :/</p></li>
<li><p><strong>list element</strong></p>
<p>Instead it's a separate list!</p></li>
</ul>
<p>End text</p>
The text was updated successfully, but these errors were encountered:
You need to use four spaces for indentation. The “Indentation/Tab Length” section in the documentation explains why it is so and how to change it.
Let me quote it here:
The syntax rules clearly state that when a list item consists of multiple paragraphs, “each subsequent paragraph in a list item must be indented by either 4 spaces or one tab” (emphasis added). However, many implementations do not enforce this rule and allow less than 4 spaces of indentation. The implementers of Python-Markdown consider it a bug to not enforce this rule.
This applies to any block level elements nested in a list, including paragraphs, sub-lists, blockquotes, code blocks, etc. They must always be indented by at least four spaces (or one tab) for each level of nesting.
In the event that one would prefer different behavior, tab_length can be set to whatever length is desired. Be warned however, as this will affect indentation for all aspects of the syntax (including root level code blocks).
Given this input markdown
I expect it to render like this:
But python-markdown gives this to me:
Every list element is put in its own list!
Markdown.pl
from https://daringfireball.net/projects/markdown/ behaves as expected:The text was updated successfully, but these errors were encountered: