Test for expected error when previewing a non-file-visiting buffer
[markdown-mode.git] / tests / lists.text
blob12b0bb285bf1415c43699de70460bfc245f00b77
1 # List Cases
3 Indentation is described in terms of four components: the position of
4 the beginning of the block, the actual indentation of the block (first
5 line), in terms of spaces, followed by whether the block begins with a
6 list marker, and the list level.
9 ## Case 1
11 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
12 eiusmod tempor incididunt ut labore et dolore magna aliqua.
14    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
15    nisi ut aliquip ex ea commodo consequat.
17  Duis aute irure dolor in reprehenderit in voluptate velit esse
18  cillum dolore eu fugiat nulla pariatur.
20 Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
21 officia deserunt mollit anim id est laborum.
23 *Indentation:* (273 0 nil 0) (399 3 nil 0) (514 1 nil 0) (620 0 nil 0)
25 *Notes:* These are all just normal paragraphs, since there are no list
26 markers or blocks indented at least four spaces.
29 ## Case 2
31 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
32 eiusmod tempor incididunt ut labore et dolore magna aliqua.
34 - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
35   nisi ut aliquip ex ea commodo a consequat.
37  Duis aute irure dolor in reprehenderit in voluptate velit esse
38 cillum dolore eu fugiat nulla pariatur.
40 - Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
41 officia deserunt mollit anim id est laborum.
43 *Indentation:* (931 0 nil 0) (1063 0 t 1) (1178 1 nil 1) (1283 0 t 1)
45 *Notes:* Even though the third block is only indented one space, it is
46 indented one more space than the list marker, so it becomes a second
47 paragraph within the first list item.
50 ## Case 3
52 + This is a list item with
53 no leading indentation and
54 no hanging indent.
56     A four-space indented block that follows
57     is parsed as a paragraph within the list item.
59 + Second list item
61 *Indentation:* (1659 0 t 1) (1733 4 nil 1) (1830 0 t 1)
64 ## Case 4
66 * This is a list item with
67   no leading indentation and
68   a hanging indent.
70     A four-space indented block that follows
71     is parsed as a paragraph within the list item.
73 *Indentation:* (1919 0 t 1) (1996 4 nil 1)
76 ## Case 5
78  * This is a list item with
79 single space leading indentation and
80 no hanging indentation.
82     A four-space indented block that follows
83     is parsed as a paragraph within the list item.
85 *Indentation:* (2149 1 t 1) (2239 4 nil 1)
88 ## Case 6
90  * This is a list item with
91 single space leading indentation and
92 no hanging indentation.
94   * A list item with two-space indent
95   starts a new list level.
97     A four-space indented block that follows
98     is parsed as a paragraph within the **first-level**
99     list item.  Why not the second level?
101 *Indentation:* (2392 2 t 1) (2482 2 t 2) (2548 4 nil 1)
104 ## Case 7
106  * This is a list item with
107 single space leading indentation and
108 no hanging indentation.
110   * A list item with two-space indent
111   starts a new list level.
113   A two-space indented block that follows
114   is parsed as a paragraph within the **first-level**
115   list item.
117 *Indentation:* (2761 1 t 1) (2851 2 t 2) (2917 2 nil 2)
120 ## Case 8
122  * This is a list item with
123 single space leading indentation and
124 no hanging indentation.
126   * A list item with two-space indent
127   starts a new list level.
129      A five-space indented block that follows is parsed as a
130      paragraph within the *second* list item.  This indentation
131      exceeds that required for the first item.
133             Finally, to get a pre block, we have to use 12 spaces.
134             That's the third level of four-space indentation.
135             We have to exceed the list level, which is two.
137 *Indentation:* (3096 1 t 1) (3186 2 t 2) (3252 5 nil 2) (3425 12 nil 2)
140 ## Case 9
142 -   This is a list item with two paragraphs.
144     This is the second paragraph in the list item. You're
145 only required to indent the first line. Lorem ipsum dolor
146 sit amet, consectetuer adipiscing elit.
148 *   Another item in the same list.
150 *Indentation:* (3700 0 t 1) (3746 4 nil 1) (3903 0 t 1)
153 ## Case 10
155 *   A list item with a blockquote:
157     > This is a blockquote
158     > inside a list item.
160 *Indentation:* (4009 0 t 1) (4045 4 nil 1)