comparison tests/test-minirst.py.out @ 9156:c9c7e8cdac9c

minimal reStructuredText parser
author Martin Geisler <mg@lazybytes.net>
date Thu, 16 Jul 2009 23:25:25 +0200
parents
children cd5b6a11b607
comparison
equal deleted inserted replaced
9155:b46063eabe98 9156:c9c7e8cdac9c
1 paragraphs formatted to fit within 60 characters:
2 ----------------------------------------------------------------------
3 This is some text in the first paragraph.
4
5 An indented paragraph with just two lines.
6
7 The third paragraph. It is followed by some random lines
8 with spurious spaces.
9
10 No indention here, despite the uneven left margin.
11
12 Only the left-most line (this line!) is significant for
13 the indentation
14 ----------------------------------------------------------------------
15
16 paragraphs formatted to fit within 30 characters:
17 ----------------------------------------------------------------------
18 This is some text in the first
19 paragraph.
20
21 An indented paragraph with
22 just two lines.
23
24 The third paragraph. It is
25 followed by some random lines
26 with spurious spaces.
27
28 No indention here, despite the
29 uneven left margin.
30
31 Only the left-most line
32 (this line!) is significant
33 for the indentation
34 ----------------------------------------------------------------------
35
36 definitions formatted to fit within 60 characters:
37 ----------------------------------------------------------------------
38 A Term
39 Definition. The indented lines make up the definition.
40 Another Term
41 Another definition. The final line in the definition
42 determines the indentation, so this will be indented
43 with four spaces.
44 A Nested/Indented Term
45 Definition.
46 ----------------------------------------------------------------------
47
48 definitions formatted to fit within 30 characters:
49 ----------------------------------------------------------------------
50 A Term
51 Definition. The indented
52 lines make up the
53 definition.
54 Another Term
55 Another definition. The
56 final line in the
57 definition determines the
58 indentation, so this will
59 be indented with four
60 spaces.
61 A Nested/Indented Term
62 Definition.
63 ----------------------------------------------------------------------
64
65 literals formatted to fit within 60 characters:
66 ----------------------------------------------------------------------
67 The fully minimized form is the most convenient form:
68
69 Hello
70 literal
71 world
72
73 In the partially minimized form a paragraph simply ends with
74 space-double-colon.
75
76 ////////////////////////////////////////
77 long un-wrapped line in a literal block
78 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
79
80 This literal block is started with '::',
81 the so-called expanded form. The paragraph
82 with '::' disappears in the final output.
83 ----------------------------------------------------------------------
84
85 literals formatted to fit within 30 characters:
86 ----------------------------------------------------------------------
87 The fully minimized form is
88 the most convenient form:
89
90 Hello
91 literal
92 world
93
94 In the partially minimized
95 form a paragraph simply ends
96 with space-double-colon.
97
98 ////////////////////////////////////////
99 long un-wrapped line in a literal block
100 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
101
102 This literal block is started with '::',
103 the so-called expanded form. The paragraph
104 with '::' disappears in the final output.
105 ----------------------------------------------------------------------
106
107 lists formatted to fit within 60 characters:
108 ----------------------------------------------------------------------
109 - This is the first list item.
110
111 Second paragraph in the first list item.
112
113 - List items need not be separated by a blank line.
114 - And will be rendered without one in any case.
115
116 We can have indented lists:
117
118 - This is an indented list item
119 - Another indented list item:
120
121 - A literal block in the middle
122 of an indented list.
123
124 (The above is not a list item since we are in the literal block.)
125
126 Literal block with no indentation.
127 ----------------------------------------------------------------------
128
129 lists formatted to fit within 30 characters:
130 ----------------------------------------------------------------------
131 - This is the first list item.
132
133 Second paragraph in the
134 first list item.
135
136 - List items need not be
137 separated by a blank line.
138 - And will be rendered without
139 one in any case.
140
141 We can have indented lists:
142
143 - This is an indented list
144 item
145 - Another indented list
146 item:
147
148 - A literal block in the middle
149 of an indented list.
150
151 (The above is not a list item since we are in the literal block.)
152
153 Literal block with no indentation.
154 ----------------------------------------------------------------------
155
156 options formatted to fit within 60 characters:
157 ----------------------------------------------------------------------
158 There is support for simple option lists, but only with long
159 options:
160
161 --all Output all.
162 --both Output both (this description is quite long).
163 --long Output all day long.
164 --par This option has two paragraphs in its
165 description. This is the first.
166
167 This is the second. Blank lines may be omitted
168 between options (as above) or left in (as here).
169
170 The next paragraph looks like an option list, but lacks the
171 two-space marker after the option. It is treated as a normal
172 paragraph:
173
174 --foo bar baz
175 ----------------------------------------------------------------------
176
177 options formatted to fit within 30 characters:
178 ----------------------------------------------------------------------
179 There is support for simple
180 option lists, but only with
181 long options:
182
183 --all Output all.
184 --both Output both (this
185 description is
186 quite long).
187 --long Output all day
188 long.
189 --par This option has two
190 paragraphs in its
191 description. This
192 is the first.
193
194 This is the second.
195 Blank lines may be
196 omitted between
197 options (as above)
198 or left in (as
199 here).
200
201 The next paragraph looks like
202 an option list, but lacks the
203 two-space marker after the
204 option. It is treated as a
205 normal paragraph:
206
207 --foo bar baz
208 ----------------------------------------------------------------------
209