File: lists3.html

package info (click to toggle)
python-markdown2 2.5.4-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 6,492 kB
  • sloc: python: 6,201; perl: 1,493; php: 865; makefile: 37
file content (79 lines) | stat: -rw-r--r-- 1,626 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<p>Single list tight:</p>

<ul>
<li>hi </li>
<li>there</li>
<li>fella </li>
</ul>

<p>Single list loose in "paragraph mode":</p>

<ul>
<li><p>hey </p></li>
<li><p>there</p></li>
<li><p>partner </p></li>
</ul>

<p>Single list loose with multiple paragraphs in an item:</p>

<ul>
<li><p>How you doin'?</p></li>
<li><p>this item contains multiple paragraphs.</p>

<p>More than one that is.</p>

<p>Three to be exact.</p></li>
<li><p>And this one is just a bunch of lines.
Spliced together as a single item.
A single paragraph.</p></li>
</ul>

<p>A single list that looks like multiple lists
separated by a blank line:</p>

<ul>
<li>list 1</li>
<li>with three</li>
<li><p>elements</p></li>
<li><p>still list 1</p></li>
<li>adding four</li>
<li>more</li>
<li><p>elements</p></li>
<li><p>sic, this is still list 1</p></li>
<li>now with</li>
<li>even</li>
<li>more</li>
<li>elements</li>
</ul>

<p>There's no way to actually get multiple consecutive lists in Markdown.
Neither Markdown.pl nor python-markdown allow it either.
In a mailing list thread a few years back, John Gruber
<a href="https://web.archive.org/web/20181229032814/http://article.gmane.org:80/gmane.text.markdown.general/2554">suggested using double blank lines</a>
to separate consecutive lists but no implementation does it.
For now you need to separate consecutive lists with unindented text:</p>

<ul>
<li>list 1</li>
<li>with three</li>
<li>elements</li>
</ul>

<p>Cough.</p>

<ul>
<li>list 2</li>
<li>with</li>
<li>four</li>
<li>elements</li>
</ul>

<p>Cough. Cough.</p>

<ul>
<li>list 3</li>
<li>with</li>
<li>even</li>
<li>more</li>
<li>elements</li>
</ul>