Show More
@@ -1,24 +1,30 b'' | |||||
1 | from pprint import pprint |
|
1 | from pprint import pprint | |
2 | from mercurial import minirst |
|
2 | from mercurial import minirst | |
3 |
|
3 | |||
4 |
def debugformat( |
|
4 | def debugformat(text, form, **kwargs): | |
5 | print "%s formatted to fit within %d characters:" % (title, width) |
|
5 | if form == 'html': | |
6 | formatted = minirst.format(text, width, **kwargs) |
|
6 | print "html format:" | |
7 |
|
|
7 | out = minirst.format(text, style=form, **kwargs) | |
|
8 | else: | |||
|
9 | print "%d column format:" % form | |||
|
10 | out = minirst.format(text, width=form, **kwargs) | |||
|
11 | ||||
8 | print "-" * 70 |
|
12 | print "-" * 70 | |
9 |
if type( |
|
13 | if type(out) == tuple: | |
10 |
print |
|
14 | print out[0][:-1] | |
11 | print "-" * 70 |
|
15 | print "-" * 70 | |
12 |
p |
|
16 | pprint(out[1]) | |
13 | print "-" * 70 |
|
|||
14 | pprint(formatted[1]) |
|
|||
15 | else: |
|
17 | else: | |
16 |
print |
|
18 | print out[:-1] | |
17 | print "-" * 70 |
|
|||
18 | print html |
|
|||
19 | print "-" * 70 |
|
19 | print "-" * 70 | |
20 |
|
20 | |||
21 |
|
21 | |||
|
22 | def debugformats(title, text, **kwargs): | |||
|
23 | print "== %s ==" % title | |||
|
24 | debugformat(text, 60, **kwargs) | |||
|
25 | debugformat(text, 30, **kwargs) | |||
|
26 | debugformat(text, 'html', **kwargs) | |||
|
27 | ||||
22 | paragraphs = """ |
|
28 | paragraphs = """ | |
23 | This is some text in the first paragraph. |
|
29 | This is some text in the first paragraph. | |
24 |
|
30 | |||
@@ -28,9 +34,7 b' This is some text in the first paragraph' | |||||
28 | \n \n \nThe third and final paragraph. |
|
34 | \n \n \nThe third and final paragraph. | |
29 | """ |
|
35 | """ | |
30 |
|
36 | |||
31 |
debugformat('paragraphs', paragraphs |
|
37 | debugformats('paragraphs', paragraphs) | |
32 | debugformat('paragraphs', paragraphs, 30) |
|
|||
33 |
|
||||
34 |
|
38 | |||
35 | definitions = """ |
|
39 | definitions = """ | |
36 | A Term |
|
40 | A Term | |
@@ -45,9 +49,7 b' Another Term' | |||||
45 | Definition. |
|
49 | Definition. | |
46 | """ |
|
50 | """ | |
47 |
|
51 | |||
48 |
debugformat('definitions', definitions |
|
52 | debugformats('definitions', definitions) | |
49 | debugformat('definitions', definitions, 30) |
|
|||
50 |
|
||||
51 |
|
53 | |||
52 | literals = r""" |
|
54 | literals = r""" | |
53 | The fully minimized form is the most |
|
55 | The fully minimized form is the most | |
@@ -71,9 +73,7 b' simply ends with space-double-colon. ::' | |||||
71 | with '::' disappears in the final output. |
|
73 | with '::' disappears in the final output. | |
72 | """ |
|
74 | """ | |
73 |
|
75 | |||
74 |
debugformat('literals', literals |
|
76 | debugformats('literals', literals) | |
75 | debugformat('literals', literals, 30) |
|
|||
76 |
|
||||
77 |
|
77 | |||
78 | lists = """ |
|
78 | lists = """ | |
79 | - This is the first list item. |
|
79 | - This is the first list item. | |
@@ -117,9 +117,7 b' Line blocks are also a form of list:' | |||||
117 | | This is the second line. |
|
117 | | This is the second line. | |
118 | """ |
|
118 | """ | |
119 |
|
119 | |||
120 |
debugformat('lists', lists |
|
120 | debugformats('lists', lists) | |
121 | debugformat('lists', lists, 30) |
|
|||
122 |
|
||||
123 |
|
121 | |||
124 | options = """ |
|
122 | options = """ | |
125 | There is support for simple option lists, |
|
123 | There is support for simple option lists, | |
@@ -145,9 +143,7 b' marker after the option. It is treated a' | |||||
145 | --foo bar baz |
|
143 | --foo bar baz | |
146 | """ |
|
144 | """ | |
147 |
|
145 | |||
148 |
debugformat('options', options |
|
146 | debugformats('options', options) | |
149 | debugformat('options', options, 30) |
|
|||
150 |
|
||||
151 |
|
147 | |||
152 | fields = """ |
|
148 | fields = """ | |
153 | :a: First item. |
|
149 | :a: First item. | |
@@ -160,8 +156,7 b' Next list:' | |||||
160 | :much too large: This key is big enough to get its own line. |
|
156 | :much too large: This key is big enough to get its own line. | |
161 | """ |
|
157 | """ | |
162 |
|
158 | |||
163 |
debugformat('fields', fields |
|
159 | debugformats('fields', fields) | |
164 | debugformat('fields', fields, 30) |
|
|||
165 |
|
160 | |||
166 | containers = """ |
|
161 | containers = """ | |
167 | Normal output. |
|
162 | Normal output. | |
@@ -179,14 +174,14 b' Normal output.' | |||||
179 | Debug output. |
|
174 | Debug output. | |
180 | """ |
|
175 | """ | |
181 |
|
176 | |||
182 |
debugformat('containers (normal)', containers |
|
177 | debugformats('containers (normal)', containers) | |
183 |
debugformat('containers (verbose)', containers |
|
178 | debugformats('containers (verbose)', containers, keep=['verbose']) | |
184 |
debugformat('containers (debug)', containers |
|
179 | debugformats('containers (debug)', containers, keep=['debug']) | |
185 |
debugformat('containers (verbose debug)', containers, |
|
180 | debugformats('containers (verbose debug)', containers, | |
186 | keep=['verbose', 'debug']) |
|
181 | keep=['verbose', 'debug']) | |
187 |
|
182 | |||
188 | roles = """Please see :hg:`add`.""" |
|
183 | roles = """Please see :hg:`add`.""" | |
189 |
debugformat('roles', roles |
|
184 | debugformats('roles', roles) | |
190 |
|
185 | |||
191 |
|
186 | |||
192 | sections = """ |
|
187 | sections = """ | |
@@ -202,7 +197,7 b' Subsection' | |||||
202 | Markup: ``foo`` and :hg:`help` |
|
197 | Markup: ``foo`` and :hg:`help` | |
203 | ------------------------------ |
|
198 | ------------------------------ | |
204 | """ |
|
199 | """ | |
205 |
debugformat('sections', sections |
|
200 | debugformats('sections', sections) | |
206 |
|
201 | |||
207 |
|
202 | |||
208 | admonitions = """ |
|
203 | admonitions = """ | |
@@ -219,7 +214,7 b' admonitions = """' | |||||
219 | This is danger |
|
214 | This is danger | |
220 | """ |
|
215 | """ | |
221 |
|
216 | |||
222 |
debugformat('admonitions', admonitions |
|
217 | debugformats('admonitions', admonitions) | |
223 |
|
218 | |||
224 | comments = """ |
|
219 | comments = """ | |
225 | Some text. |
|
220 | Some text. | |
@@ -235,7 +230,7 b' Some text.' | |||||
235 | Empty comment above |
|
230 | Empty comment above | |
236 | """ |
|
231 | """ | |
237 |
|
232 | |||
238 |
debugformat('comments', comments |
|
233 | debugformats('comments', comments) | |
239 |
|
234 | |||
240 |
|
235 | |||
241 | data = [['a', 'b', 'c'], |
|
236 | data = [['a', 'b', 'c'], | |
@@ -246,4 +241,4 b' table = minirst.maketable(data, 2, True)' | |||||
246 |
|
241 | |||
247 | print table |
|
242 | print table | |
248 |
|
243 | |||
249 |
debugformat('table', table |
|
244 | debugformats('table', table) |
This diff has been collapsed as it changes many lines, (521 lines changed) Show them Hide them | |||||
@@ -1,4 +1,5 b'' | |||||
1 | paragraphs formatted to fit within 60 characters: |
|
1 | == paragraphs == | |
|
2 | 60 column format: | |||
2 | ---------------------------------------------------------------------- |
|
3 | ---------------------------------------------------------------------- | |
3 | This is some text in the first paragraph. |
|
4 | This is some text in the first paragraph. | |
4 |
|
5 | |||
@@ -6,7 +7,22 b' This is some text in the first paragraph' | |||||
6 | containing random whitespace. |
|
7 | containing random whitespace. | |
7 |
|
8 | |||
8 | The third and final paragraph. |
|
9 | The third and final paragraph. | |
|
10 | ---------------------------------------------------------------------- | |||
9 |
|
11 | |||
|
12 | 30 column format: | |||
|
13 | ---------------------------------------------------------------------- | |||
|
14 | This is some text in the first | |||
|
15 | paragraph. | |||
|
16 | ||||
|
17 | A small indented paragraph. | |||
|
18 | It is followed by some lines | |||
|
19 | containing random | |||
|
20 | whitespace. | |||
|
21 | ||||
|
22 | The third and final paragraph. | |||
|
23 | ---------------------------------------------------------------------- | |||
|
24 | ||||
|
25 | html format: | |||
10 | ---------------------------------------------------------------------- |
|
26 | ---------------------------------------------------------------------- | |
11 | <p> |
|
27 | <p> | |
12 | This is some text in the first paragraph. |
|
28 | This is some text in the first paragraph. | |
@@ -19,37 +35,10 b' containing random whitespace.' | |||||
19 | <p> |
|
35 | <p> | |
20 | The third and final paragraph. |
|
36 | The third and final paragraph. | |
21 | </p> |
|
37 | </p> | |
22 |
|
||||
23 | ---------------------------------------------------------------------- |
|
38 | ---------------------------------------------------------------------- | |
24 |
|
39 | |||
25 | paragraphs formatted to fit within 30 characters: |
|
40 | == definitions == | |
26 | ---------------------------------------------------------------------- |
|
41 | 60 column format: | |
27 | This is some text in the first |
|
|||
28 | paragraph. |
|
|||
29 |
|
||||
30 | A small indented paragraph. |
|
|||
31 | It is followed by some lines |
|
|||
32 | containing random |
|
|||
33 | whitespace. |
|
|||
34 |
|
||||
35 | The third and final paragraph. |
|
|||
36 |
|
||||
37 | ---------------------------------------------------------------------- |
|
|||
38 | <p> |
|
|||
39 | This is some text in the first paragraph. |
|
|||
40 | </p> |
|
|||
41 | <p> |
|
|||
42 | A small indented paragraph. |
|
|||
43 | It is followed by some lines |
|
|||
44 | containing random whitespace. |
|
|||
45 | </p> |
|
|||
46 | <p> |
|
|||
47 | The third and final paragraph. |
|
|||
48 | </p> |
|
|||
49 |
|
||||
50 | ---------------------------------------------------------------------- |
|
|||
51 |
|
||||
52 | definitions formatted to fit within 60 characters: |
|
|||
53 | ---------------------------------------------------------------------- |
|
42 | ---------------------------------------------------------------------- | |
54 | A Term |
|
43 | A Term | |
55 | Definition. The indented lines make up the definition. |
|
44 | Definition. The indented lines make up the definition. | |
@@ -61,20 +50,9 b' Another Term' | |||||
61 |
|
50 | |||
62 | A Nested/Indented Term |
|
51 | A Nested/Indented Term | |
63 | Definition. |
|
52 | Definition. | |
64 |
|
||||
65 | ---------------------------------------------------------------------- |
|
|||
66 | <dl> |
|
|||
67 | <dt>A Term |
|
|||
68 | <dd>Definition. The indented lines make up the definition. |
|
|||
69 | <dt>Another Term |
|
|||
70 | <dd>Another definition. The final line in the definition determines the indentation, so this will be indented with four spaces. |
|
|||
71 | <dt>A Nested/Indented Term |
|
|||
72 | <dd>Definition. |
|
|||
73 | </dl> |
|
|||
74 |
|
||||
75 | ---------------------------------------------------------------------- |
|
53 | ---------------------------------------------------------------------- | |
76 |
|
54 | |||
77 | definitions formatted to fit within 30 characters: |
|
55 | 30 column format: | |
78 | ---------------------------------------------------------------------- |
|
56 | ---------------------------------------------------------------------- | |
79 | A Term |
|
57 | A Term | |
80 | Definition. The indented |
|
58 | Definition. The indented | |
@@ -91,7 +69,9 b' Another Term' | |||||
91 |
|
69 | |||
92 | A Nested/Indented Term |
|
70 | A Nested/Indented Term | |
93 | Definition. |
|
71 | Definition. | |
|
72 | ---------------------------------------------------------------------- | |||
94 |
|
73 | |||
|
74 | html format: | |||
95 | ---------------------------------------------------------------------- |
|
75 | ---------------------------------------------------------------------- | |
96 | <dl> |
|
76 | <dl> | |
97 | <dt>A Term |
|
77 | <dt>A Term | |
@@ -101,10 +81,10 b' Another Term' | |||||
101 | <dt>A Nested/Indented Term |
|
81 | <dt>A Nested/Indented Term | |
102 | <dd>Definition. |
|
82 | <dd>Definition. | |
103 | </dl> |
|
83 | </dl> | |
104 |
|
||||
105 | ---------------------------------------------------------------------- |
|
84 | ---------------------------------------------------------------------- | |
106 |
|
85 | |||
107 | literals formatted to fit within 60 characters: |
|
86 | == literals == | |
|
87 | 60 column format: | |||
108 | ---------------------------------------------------------------------- |
|
88 | ---------------------------------------------------------------------- | |
109 | The fully minimized form is the most convenient form: |
|
89 | The fully minimized form is the most convenient form: | |
110 |
|
90 | |||
@@ -122,7 +102,31 b' space-double-colon.' | |||||
122 | This literal block is started with '::', |
|
102 | This literal block is started with '::', | |
123 | the so-called expanded form. The paragraph |
|
103 | the so-called expanded form. The paragraph | |
124 | with '::' disappears in the final output. |
|
104 | with '::' disappears in the final output. | |
|
105 | ---------------------------------------------------------------------- | |||
125 |
|
106 | |||
|
107 | 30 column format: | |||
|
108 | ---------------------------------------------------------------------- | |||
|
109 | The fully minimized form is | |||
|
110 | the most convenient form: | |||
|
111 | ||||
|
112 | Hello | |||
|
113 | literal | |||
|
114 | world | |||
|
115 | ||||
|
116 | In the partially minimized | |||
|
117 | form a paragraph simply ends | |||
|
118 | with space-double-colon. | |||
|
119 | ||||
|
120 | //////////////////////////////////////// | |||
|
121 | long un-wrapped line in a literal block | |||
|
122 | \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ | |||
|
123 | ||||
|
124 | This literal block is started with '::', | |||
|
125 | the so-called expanded form. The paragraph | |||
|
126 | with '::' disappears in the final output. | |||
|
127 | ---------------------------------------------------------------------- | |||
|
128 | ||||
|
129 | html format: | |||
126 | ---------------------------------------------------------------------- |
|
130 | ---------------------------------------------------------------------- | |
127 | <p> |
|
131 | <p> | |
128 | The fully minimized form is the most |
|
132 | The fully minimized form is the most | |
@@ -147,58 +151,10 b" This literal block is started with '::'," | |||||
147 | the so-called expanded form. The paragraph |
|
151 | the so-called expanded form. The paragraph | |
148 | with '::' disappears in the final output. |
|
152 | with '::' disappears in the final output. | |
149 | </pre> |
|
153 | </pre> | |
150 |
|
||||
151 | ---------------------------------------------------------------------- |
|
154 | ---------------------------------------------------------------------- | |
152 |
|
155 | |||
153 | literals formatted to fit within 30 characters: |
|
156 | == lists == | |
154 | ---------------------------------------------------------------------- |
|
157 | 60 column format: | |
155 | The fully minimized form is |
|
|||
156 | the most convenient form: |
|
|||
157 |
|
||||
158 | Hello |
|
|||
159 | literal |
|
|||
160 | world |
|
|||
161 |
|
||||
162 | In the partially minimized |
|
|||
163 | form a paragraph simply ends |
|
|||
164 | with space-double-colon. |
|
|||
165 |
|
||||
166 | //////////////////////////////////////// |
|
|||
167 | long un-wrapped line in a literal block |
|
|||
168 | \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
|
|||
169 |
|
||||
170 | This literal block is started with '::', |
|
|||
171 | the so-called expanded form. The paragraph |
|
|||
172 | with '::' disappears in the final output. |
|
|||
173 |
|
||||
174 | ---------------------------------------------------------------------- |
|
|||
175 | <p> |
|
|||
176 | The fully minimized form is the most |
|
|||
177 | convenient form: |
|
|||
178 | </p> |
|
|||
179 | <pre> |
|
|||
180 | Hello |
|
|||
181 | literal |
|
|||
182 | world |
|
|||
183 | </pre> |
|
|||
184 | <p> |
|
|||
185 | In the partially minimized form a paragraph |
|
|||
186 | simply ends with space-double-colon. |
|
|||
187 | </p> |
|
|||
188 | <pre> |
|
|||
189 | //////////////////////////////////////// |
|
|||
190 | long un-wrapped line in a literal block |
|
|||
191 | \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
|
|||
192 | </pre> |
|
|||
193 | <pre> |
|
|||
194 | This literal block is started with '::', |
|
|||
195 | the so-called expanded form. The paragraph |
|
|||
196 | with '::' disappears in the final output. |
|
|||
197 | </pre> |
|
|||
198 |
|
||||
199 | ---------------------------------------------------------------------- |
|
|||
200 |
|
||||
201 | lists formatted to fit within 60 characters: |
|
|||
202 | ---------------------------------------------------------------------- |
|
158 | ---------------------------------------------------------------------- | |
203 | - This is the first list item. |
|
159 | - This is the first list item. | |
204 |
|
160 | |||
@@ -231,7 +187,53 b' Line blocks are also a form of list:' | |||||
231 |
|
187 | |||
232 | This is the first line. The line continues here. |
|
188 | This is the first line. The line continues here. | |
233 | This is the second line. |
|
189 | This is the second line. | |
|
190 | ---------------------------------------------------------------------- | |||
234 |
|
191 | |||
|
192 | 30 column format: | |||
|
193 | ---------------------------------------------------------------------- | |||
|
194 | - This is the first list item. | |||
|
195 | ||||
|
196 | Second paragraph in the | |||
|
197 | first list item. | |||
|
198 | ||||
|
199 | - List items need not be | |||
|
200 | separated by a blank line. | |||
|
201 | - And will be rendered without | |||
|
202 | one in any case. | |||
|
203 | ||||
|
204 | We can have indented lists: | |||
|
205 | ||||
|
206 | - This is an indented list | |||
|
207 | item | |||
|
208 | - Another indented list | |||
|
209 | item: | |||
|
210 | ||||
|
211 | - A literal block in the middle | |||
|
212 | of an indented list. | |||
|
213 | ||||
|
214 | (The above is not a list item since we are in the literal block.) | |||
|
215 | ||||
|
216 | Literal block with no indentation (apart from | |||
|
217 | the two spaces added to all literal blocks). | |||
|
218 | ||||
|
219 | 1. This is an enumerated list | |||
|
220 | (first item). | |||
|
221 | 2. Continuing with the second | |||
|
222 | item. | |||
|
223 | (1) foo | |||
|
224 | (2) bar | |||
|
225 | 1) Another | |||
|
226 | 2) List | |||
|
227 | ||||
|
228 | Line blocks are also a form of | |||
|
229 | list: | |||
|
230 | ||||
|
231 | This is the first line. The | |||
|
232 | line continues here. | |||
|
233 | This is the second line. | |||
|
234 | ---------------------------------------------------------------------- | |||
|
235 | ||||
|
236 | html format: | |||
235 | ---------------------------------------------------------------------- |
|
237 | ---------------------------------------------------------------------- | |
236 | <ul> |
|
238 | <ul> | |
237 | <li> This is the first list item. |
|
239 | <li> This is the first list item. | |
@@ -274,98 +276,10 b' Line blocks are also a form of list:' | |||||
274 | <li> This is the first line. The line continues here. |
|
276 | <li> This is the first line. The line continues here. | |
275 | <li> This is the second line. |
|
277 | <li> This is the second line. | |
276 | </ol> |
|
278 | </ol> | |
277 |
|
||||
278 | ---------------------------------------------------------------------- |
|
279 | ---------------------------------------------------------------------- | |
279 |
|
280 | |||
280 | lists formatted to fit within 30 characters: |
|
281 | == options == | |
281 | ---------------------------------------------------------------------- |
|
282 | 60 column format: | |
282 | - This is the first list item. |
|
|||
283 |
|
||||
284 | Second paragraph in the |
|
|||
285 | first list item. |
|
|||
286 |
|
||||
287 | - List items need not be |
|
|||
288 | separated by a blank line. |
|
|||
289 | - And will be rendered without |
|
|||
290 | one in any case. |
|
|||
291 |
|
||||
292 | We can have indented lists: |
|
|||
293 |
|
||||
294 | - This is an indented list |
|
|||
295 | item |
|
|||
296 | - Another indented list |
|
|||
297 | item: |
|
|||
298 |
|
||||
299 | - A literal block in the middle |
|
|||
300 | of an indented list. |
|
|||
301 |
|
||||
302 | (The above is not a list item since we are in the literal block.) |
|
|||
303 |
|
||||
304 | Literal block with no indentation (apart from |
|
|||
305 | the two spaces added to all literal blocks). |
|
|||
306 |
|
||||
307 | 1. This is an enumerated list |
|
|||
308 | (first item). |
|
|||
309 | 2. Continuing with the second |
|
|||
310 | item. |
|
|||
311 | (1) foo |
|
|||
312 | (2) bar |
|
|||
313 | 1) Another |
|
|||
314 | 2) List |
|
|||
315 |
|
||||
316 | Line blocks are also a form of |
|
|||
317 | list: |
|
|||
318 |
|
||||
319 | This is the first line. The |
|
|||
320 | line continues here. |
|
|||
321 | This is the second line. |
|
|||
322 |
|
||||
323 | ---------------------------------------------------------------------- |
|
|||
324 | <ul> |
|
|||
325 | <li> This is the first list item. |
|
|||
326 | <p> |
|
|||
327 | Second paragraph in the first list item. |
|
|||
328 | </p> |
|
|||
329 | <li> List items need not be separated by a blank line. |
|
|||
330 | <li> And will be rendered without one in any case. |
|
|||
331 | </ul> |
|
|||
332 | <p> |
|
|||
333 | We can have indented lists: |
|
|||
334 | </p> |
|
|||
335 | <ul> |
|
|||
336 | <li> This is an indented list item |
|
|||
337 | <li> Another indented list item: |
|
|||
338 | <pre> |
|
|||
339 | - A literal block in the middle |
|
|||
340 | of an indented list. |
|
|||
341 | </pre> |
|
|||
342 | <pre> |
|
|||
343 | (The above is not a list item since we are in the literal block.) |
|
|||
344 | </pre> |
|
|||
345 | </ul> |
|
|||
346 | <pre> |
|
|||
347 | Literal block with no indentation (apart from |
|
|||
348 | the two spaces added to all literal blocks). |
|
|||
349 | </pre> |
|
|||
350 | <ol> |
|
|||
351 | <li> This is an enumerated list (first item). |
|
|||
352 | <li> Continuing with the second item. |
|
|||
353 | <li> foo |
|
|||
354 | <li> bar |
|
|||
355 | <li> Another |
|
|||
356 | <li> List |
|
|||
357 | </ol> |
|
|||
358 | <p> |
|
|||
359 | Line blocks are also a form of list: |
|
|||
360 | </p> |
|
|||
361 | <ol> |
|
|||
362 | <li> This is the first line. The line continues here. |
|
|||
363 | <li> This is the second line. |
|
|||
364 | </ol> |
|
|||
365 |
|
||||
366 | ---------------------------------------------------------------------- |
|
|||
367 |
|
||||
368 | options formatted to fit within 60 characters: |
|
|||
369 | ---------------------------------------------------------------------- |
|
283 | ---------------------------------------------------------------------- | |
370 | There is support for simple option lists, but only with long |
|
284 | There is support for simple option lists, but only with long | |
371 | options: |
|
285 | options: | |
@@ -390,41 +304,9 b' two-space marker after the option. It is' | |||||
390 | paragraph: |
|
304 | paragraph: | |
391 |
|
305 | |||
392 | --foo bar baz |
|
306 | --foo bar baz | |
393 |
|
||||
394 | ---------------------------------------------------------------------- |
|
|||
395 | <p> |
|
|||
396 | There is support for simple option lists, |
|
|||
397 | but only with long options: |
|
|||
398 | </p> |
|
|||
399 | <dl> |
|
|||
400 | <dt>-X --exclude filter |
|
|||
401 | <dd>an option with a short and long option with an argument |
|
|||
402 | <dt>-I --include |
|
|||
403 | <dd>an option with both a short option and a long option |
|
|||
404 | <dt> --all |
|
|||
405 | <dd>Output all. |
|
|||
406 | <dt> --both |
|
|||
407 | <dd>Output both (this description is quite long). |
|
|||
408 | <dt> --long |
|
|||
409 | <dd>Output all day long. |
|
|||
410 | <dt> --par |
|
|||
411 | <dd>This option has two paragraphs in its description. This is the first. |
|
|||
412 | <p> |
|
|||
413 | This is the second. Blank lines may be omitted between |
|
|||
414 | options (as above) or left in (as here). |
|
|||
415 | </p> |
|
|||
416 | </dl> |
|
|||
417 | <p> |
|
|||
418 | The next paragraph looks like an option list, but lacks the two-space |
|
|||
419 | marker after the option. It is treated as a normal paragraph: |
|
|||
420 | </p> |
|
|||
421 | <p> |
|
|||
422 | --foo bar baz |
|
|||
423 | </p> |
|
|||
424 |
|
||||
425 | ---------------------------------------------------------------------- |
|
307 | ---------------------------------------------------------------------- | |
426 |
|
308 | |||
427 | options formatted to fit within 30 characters: |
|
309 | 30 column format: | |
428 | ---------------------------------------------------------------------- |
|
310 | ---------------------------------------------------------------------- | |
429 | There is support for simple |
|
311 | There is support for simple | |
430 | option lists, but only with |
|
312 | option lists, but only with | |
@@ -494,7 +376,9 b' option. It is treated as a' | |||||
494 | normal paragraph: |
|
376 | normal paragraph: | |
495 |
|
377 | |||
496 | --foo bar baz |
|
378 | --foo bar baz | |
|
379 | ---------------------------------------------------------------------- | |||
497 |
|
380 | |||
|
381 | html format: | |||
498 | ---------------------------------------------------------------------- |
|
382 | ---------------------------------------------------------------------- | |
499 | <p> |
|
383 | <p> | |
500 | There is support for simple option lists, |
|
384 | There is support for simple option lists, | |
@@ -525,10 +409,10 b' marker after the option. It is treated a' | |||||
525 | <p> |
|
409 | <p> | |
526 | --foo bar baz |
|
410 | --foo bar baz | |
527 | </p> |
|
411 | </p> | |
528 |
|
||||
529 | ---------------------------------------------------------------------- |
|
412 | ---------------------------------------------------------------------- | |
530 |
|
413 | |||
531 | fields formatted to fit within 60 characters: |
|
414 | == fields == | |
|
415 | 60 column format: | |||
532 | ---------------------------------------------------------------------- |
|
416 | ---------------------------------------------------------------------- | |
533 | a First item. |
|
417 | a First item. | |
534 | ab Second item. Indentation and wrapping is handled |
|
418 | ab Second item. Indentation and wrapping is handled | |
@@ -540,27 +424,9 b' small The larger key below trigger' | |||||
540 | here. |
|
424 | here. | |
541 | much too large |
|
425 | much too large | |
542 | This key is big enough to get its own line. |
|
426 | This key is big enough to get its own line. | |
543 |
|
||||
544 | ---------------------------------------------------------------------- |
|
|||
545 | <dl> |
|
|||
546 | <dt>a |
|
|||
547 | <dd>First item. |
|
|||
548 | <dt>ab |
|
|||
549 | <dd>Second item. Indentation and wrapping is handled automatically. |
|
|||
550 | </dl> |
|
|||
551 | <p> |
|
|||
552 | Next list: |
|
|||
553 | </p> |
|
|||
554 | <dl> |
|
|||
555 | <dt>small |
|
|||
556 | <dd>The larger key below triggers full indentation here. |
|
|||
557 | <dt>much too large |
|
|||
558 | <dd>This key is big enough to get its own line. |
|
|||
559 | </dl> |
|
|||
560 |
|
||||
561 | ---------------------------------------------------------------------- |
|
427 | ---------------------------------------------------------------------- | |
562 |
|
428 | |||
563 | fields formatted to fit within 30 characters: |
|
429 | 30 column format: | |
564 | ---------------------------------------------------------------------- |
|
430 | ---------------------------------------------------------------------- | |
565 | a First item. |
|
431 | a First item. | |
566 | ab Second item. Indentation |
|
432 | ab Second item. Indentation | |
@@ -577,7 +443,9 b' much too large' | |||||
577 | This key is big |
|
443 | This key is big | |
578 | enough to get its |
|
444 | enough to get its | |
579 | own line. |
|
445 | own line. | |
|
446 | ---------------------------------------------------------------------- | |||
580 |
|
447 | |||
|
448 | html format: | |||
581 | ---------------------------------------------------------------------- |
|
449 | ---------------------------------------------------------------------- | |
582 | <dl> |
|
450 | <dl> | |
583 | <dt>a |
|
451 | <dt>a | |
@@ -594,45 +462,90 b' Next list:' | |||||
594 | <dt>much too large |
|
462 | <dt>much too large | |
595 | <dd>This key is big enough to get its own line. |
|
463 | <dd>This key is big enough to get its own line. | |
596 | </dl> |
|
464 | </dl> | |
597 |
|
||||
598 | ---------------------------------------------------------------------- |
|
465 | ---------------------------------------------------------------------- | |
599 |
|
466 | |||
600 | containers (normal) formatted to fit within 60 characters: |
|
467 | == containers (normal) == | |
|
468 | 60 column format: | |||
601 | ---------------------------------------------------------------------- |
|
469 | ---------------------------------------------------------------------- | |
602 | Normal output. |
|
470 | Normal output. | |
|
471 | ---------------------------------------------------------------------- | |||
603 |
|
472 | |||
|
473 | 30 column format: | |||
|
474 | ---------------------------------------------------------------------- | |||
|
475 | Normal output. | |||
|
476 | ---------------------------------------------------------------------- | |||
|
477 | ||||
|
478 | html format: | |||
604 | ---------------------------------------------------------------------- |
|
479 | ---------------------------------------------------------------------- | |
605 | <p> |
|
480 | <p> | |
606 | Normal output. |
|
481 | Normal output. | |
607 | </p> |
|
482 | </p> | |
608 |
|
||||
609 | ---------------------------------------------------------------------- |
|
483 | ---------------------------------------------------------------------- | |
610 |
|
484 | |||
611 | containers (verbose) formatted to fit within 60 characters: |
|
485 | == containers (verbose) == | |
|
486 | 60 column format: | |||
|
487 | ---------------------------------------------------------------------- | |||
|
488 | Normal output. | |||
|
489 | ||||
|
490 | Verbose output. | |||
|
491 | ---------------------------------------------------------------------- | |||
|
492 | ['debug', 'debug'] | |||
|
493 | ---------------------------------------------------------------------- | |||
|
494 | ||||
|
495 | 30 column format: | |||
612 | ---------------------------------------------------------------------- |
|
496 | ---------------------------------------------------------------------- | |
613 | Normal output. |
|
497 | Normal output. | |
614 |
|
498 | |||
615 | Verbose output. |
|
499 | Verbose output. | |
|
500 | ---------------------------------------------------------------------- | |||
|
501 | ['debug', 'debug'] | |||
|
502 | ---------------------------------------------------------------------- | |||
616 |
|
503 | |||
|
504 | html format: | |||
617 | ---------------------------------------------------------------------- |
|
505 | ---------------------------------------------------------------------- | |
618 | ('<p>\nNormal output.\n</p>\n<p>\nVerbose output.\n</p>\n', ['debug', 'debug']) |
|
506 | <p> | |
|
507 | Normal output. | |||
|
508 | </p> | |||
|
509 | <p> | |||
|
510 | Verbose output. | |||
|
511 | </p> | |||
619 | ---------------------------------------------------------------------- |
|
512 | ---------------------------------------------------------------------- | |
620 | ['debug', 'debug'] |
|
513 | ['debug', 'debug'] | |
621 | ---------------------------------------------------------------------- |
|
514 | ---------------------------------------------------------------------- | |
622 |
|
515 | |||
623 | containers (debug) formatted to fit within 60 characters: |
|
516 | == containers (debug) == | |
|
517 | 60 column format: | |||
|
518 | ---------------------------------------------------------------------- | |||
|
519 | Normal output. | |||
|
520 | ||||
|
521 | Initial debug output. | |||
|
522 | ---------------------------------------------------------------------- | |||
|
523 | ['verbose'] | |||
|
524 | ---------------------------------------------------------------------- | |||
|
525 | ||||
|
526 | 30 column format: | |||
624 | ---------------------------------------------------------------------- |
|
527 | ---------------------------------------------------------------------- | |
625 | Normal output. |
|
528 | Normal output. | |
626 |
|
529 | |||
627 | Initial debug output. |
|
530 | Initial debug output. | |
628 |
|
||||
629 | ---------------------------------------------------------------------- |
|
|||
630 | ('<p>\nNormal output.\n</p>\n<p>\nInitial debug output.\n</p>\n', ['verbose']) |
|
|||
631 | ---------------------------------------------------------------------- |
|
531 | ---------------------------------------------------------------------- | |
632 | ['verbose'] |
|
532 | ['verbose'] | |
633 | ---------------------------------------------------------------------- |
|
533 | ---------------------------------------------------------------------- | |
634 |
|
534 | |||
635 | containers (verbose debug) formatted to fit within 60 characters: |
|
535 | html format: | |
|
536 | ---------------------------------------------------------------------- | |||
|
537 | <p> | |||
|
538 | Normal output. | |||
|
539 | </p> | |||
|
540 | <p> | |||
|
541 | Initial debug output. | |||
|
542 | </p> | |||
|
543 | ---------------------------------------------------------------------- | |||
|
544 | ['verbose'] | |||
|
545 | ---------------------------------------------------------------------- | |||
|
546 | ||||
|
547 | == containers (verbose debug) == | |||
|
548 | 60 column format: | |||
636 | ---------------------------------------------------------------------- |
|
549 | ---------------------------------------------------------------------- | |
637 | Normal output. |
|
550 | Normal output. | |
638 |
|
551 | |||
@@ -641,25 +554,61 b' Initial debug output.' | |||||
641 | Verbose output. |
|
554 | Verbose output. | |
642 |
|
555 | |||
643 | Debug output. |
|
556 | Debug output. | |
|
557 | ---------------------------------------------------------------------- | |||
|
558 | [] | |||
|
559 | ---------------------------------------------------------------------- | |||
644 |
|
560 | |||
|
561 | 30 column format: | |||
645 | ---------------------------------------------------------------------- |
|
562 | ---------------------------------------------------------------------- | |
646 | ('<p>\nNormal output.\n</p>\n<p>\nInitial debug output.\n</p>\n<p>\nVerbose output.\n</p>\n<p>\nDebug output.\n</p>\n', []) |
|
563 | Normal output. | |
|
564 | ||||
|
565 | Initial debug output. | |||
|
566 | ||||
|
567 | Verbose output. | |||
|
568 | ||||
|
569 | Debug output. | |||
647 | ---------------------------------------------------------------------- |
|
570 | ---------------------------------------------------------------------- | |
648 | [] |
|
571 | [] | |
649 | ---------------------------------------------------------------------- |
|
572 | ---------------------------------------------------------------------- | |
650 |
|
573 | |||
651 | roles formatted to fit within 60 characters: |
|
574 | html format: | |
|
575 | ---------------------------------------------------------------------- | |||
|
576 | <p> | |||
|
577 | Normal output. | |||
|
578 | </p> | |||
|
579 | <p> | |||
|
580 | Initial debug output. | |||
|
581 | </p> | |||
|
582 | <p> | |||
|
583 | Verbose output. | |||
|
584 | </p> | |||
|
585 | <p> | |||
|
586 | Debug output. | |||
|
587 | </p> | |||
|
588 | ---------------------------------------------------------------------- | |||
|
589 | [] | |||
|
590 | ---------------------------------------------------------------------- | |||
|
591 | ||||
|
592 | == roles == | |||
|
593 | 60 column format: | |||
652 | ---------------------------------------------------------------------- |
|
594 | ---------------------------------------------------------------------- | |
653 | Please see "hg add". |
|
595 | Please see "hg add". | |
|
596 | ---------------------------------------------------------------------- | |||
654 |
|
597 | |||
|
598 | 30 column format: | |||
|
599 | ---------------------------------------------------------------------- | |||
|
600 | Please see "hg add". | |||
|
601 | ---------------------------------------------------------------------- | |||
|
602 | ||||
|
603 | html format: | |||
655 | ---------------------------------------------------------------------- |
|
604 | ---------------------------------------------------------------------- | |
656 | <p> |
|
605 | <p> | |
657 | Please see "hg add". |
|
606 | Please see "hg add". | |
658 | </p> |
|
607 | </p> | |
659 |
|
||||
660 | ---------------------------------------------------------------------- |
|
608 | ---------------------------------------------------------------------- | |
661 |
|
609 | |||
662 | sections formatted to fit within 20 characters: |
|
610 | == sections == | |
|
611 | 60 column format: | |||
663 | ---------------------------------------------------------------------- |
|
612 | ---------------------------------------------------------------------- | |
664 | Title |
|
613 | Title | |
665 | ===== |
|
614 | ===== | |
@@ -672,16 +621,48 b' Subsection' | |||||
672 |
|
621 | |||
673 | Markup: "foo" and "hg help" |
|
622 | Markup: "foo" and "hg help" | |
674 | --------------------------- |
|
623 | --------------------------- | |
|
624 | ---------------------------------------------------------------------- | |||
675 |
|
625 | |||
|
626 | 30 column format: | |||
|
627 | ---------------------------------------------------------------------- | |||
|
628 | Title | |||
|
629 | ===== | |||
|
630 | ||||
|
631 | Section | |||
|
632 | ------- | |||
|
633 | ||||
|
634 | Subsection | |||
|
635 | '''''''''' | |||
|
636 | ||||
|
637 | Markup: "foo" and "hg help" | |||
|
638 | --------------------------- | |||
|
639 | ---------------------------------------------------------------------- | |||
|
640 | ||||
|
641 | html format: | |||
676 | ---------------------------------------------------------------------- |
|
642 | ---------------------------------------------------------------------- | |
677 | <h1>Title</h1> |
|
643 | <h1>Title</h1> | |
678 | <h2>Section</h2> |
|
644 | <h2>Section</h2> | |
679 | <h3>Subsection</h3> |
|
645 | <h3>Subsection</h3> | |
680 | <h2>Markup: "foo" and "hg help"</h2> |
|
646 | <h2>Markup: "foo" and "hg help"</h2> | |
681 |
|
||||
682 | ---------------------------------------------------------------------- |
|
647 | ---------------------------------------------------------------------- | |
683 |
|
648 | |||
684 | admonitions formatted to fit within 30 characters: |
|
649 | == admonitions == | |
|
650 | 60 column format: | |||
|
651 | ---------------------------------------------------------------------- | |||
|
652 | Note: | |||
|
653 | This is a note | |||
|
654 | ||||
|
655 | - Bullet 1 | |||
|
656 | - Bullet 2 | |||
|
657 | ||||
|
658 | Warning! | |||
|
659 | This is a warning Second input line of warning | |||
|
660 | ||||
|
661 | !Danger! | |||
|
662 | This is danger | |||
|
663 | ---------------------------------------------------------------------- | |||
|
664 | ||||
|
665 | 30 column format: | |||
685 | ---------------------------------------------------------------------- |
|
666 | ---------------------------------------------------------------------- | |
686 | Note: |
|
667 | Note: | |
687 | This is a note |
|
668 | This is a note | |
@@ -695,7 +676,9 b' Note:' | |||||
695 |
|
676 | |||
696 | !Danger! |
|
677 | !Danger! | |
697 | This is danger |
|
678 | This is danger | |
|
679 | ---------------------------------------------------------------------- | |||
698 |
|
680 | |||
|
681 | html format: | |||
699 | ---------------------------------------------------------------------- |
|
682 | ---------------------------------------------------------------------- | |
700 | <p> |
|
683 | <p> | |
701 | <b>Note:</b> This is a note |
|
684 | <b>Note:</b> This is a note | |
@@ -710,17 +693,28 b' Note:' | |||||
710 | <p> |
|
693 | <p> | |
711 | <b>!Danger!</b> This is danger |
|
694 | <b>!Danger!</b> This is danger | |
712 | </p> |
|
695 | </p> | |
713 |
|
||||
714 | ---------------------------------------------------------------------- |
|
696 | ---------------------------------------------------------------------- | |
715 |
|
697 | |||
716 | comments formatted to fit within 30 characters: |
|
698 | == comments == | |
|
699 | 60 column format: | |||
717 | ---------------------------------------------------------------------- |
|
700 | ---------------------------------------------------------------------- | |
718 | Some text. |
|
701 | Some text. | |
719 |
|
702 | |||
720 | Some indented text. |
|
703 | Some indented text. | |
721 |
|
704 | |||
722 | Empty comment above |
|
705 | Empty comment above | |
|
706 | ---------------------------------------------------------------------- | |||
723 |
|
707 | |||
|
708 | 30 column format: | |||
|
709 | ---------------------------------------------------------------------- | |||
|
710 | Some text. | |||
|
711 | ||||
|
712 | Some indented text. | |||
|
713 | ||||
|
714 | Empty comment above | |||
|
715 | ---------------------------------------------------------------------- | |||
|
716 | ||||
|
717 | html format: | |||
724 | ---------------------------------------------------------------------- |
|
718 | ---------------------------------------------------------------------- | |
725 | <p> |
|
719 | <p> | |
726 | Some text. |
|
720 | Some text. | |
@@ -731,7 +725,6 b' Some indented text.' | |||||
731 | <p> |
|
725 | <p> | |
732 | Empty comment above |
|
726 | Empty comment above | |
733 | </p> |
|
727 | </p> | |
734 |
|
||||
735 | ---------------------------------------------------------------------- |
|
728 | ---------------------------------------------------------------------- | |
736 |
|
729 | |||
737 | === === ======================================== |
|
730 | === === ======================================== | |
@@ -741,7 +734,16 b' Empty comment above' | |||||
741 | foo bar baz this list is very very very long man |
|
734 | foo bar baz this list is very very very long man | |
742 | === === ======================================== |
|
735 | === === ======================================== | |
743 |
|
736 | |||
744 | table formatted to fit within 30 characters: |
|
737 | == table == | |
|
738 | 60 column format: | |||
|
739 | ---------------------------------------------------------------------- | |||
|
740 | a b c | |||
|
741 | ------------------------------------------------ | |||
|
742 | 1 2 3 | |||
|
743 | foo bar baz this list is very very very long man | |||
|
744 | ---------------------------------------------------------------------- | |||
|
745 | ||||
|
746 | 30 column format: | |||
745 | ---------------------------------------------------------------------- |
|
747 | ---------------------------------------------------------------------- | |
746 | a b c |
|
748 | a b c | |
747 | ------------------------------ |
|
749 | ------------------------------ | |
@@ -749,13 +751,14 b' table formatted to fit within 30 charact' | |||||
749 | foo bar baz this list is |
|
751 | foo bar baz this list is | |
750 | very very very long |
|
752 | very very very long | |
751 | man |
|
753 | man | |
|
754 | ---------------------------------------------------------------------- | |||
752 |
|
755 | |||
|
756 | html format: | |||
753 | ---------------------------------------------------------------------- |
|
757 | ---------------------------------------------------------------------- | |
754 | <table> |
|
758 | <table> | |
755 | <tr><th>a</th><th>b</th><th>c</th></tr> |
|
759 | <tr><th>a</th><th>b</th><th>c</th></tr> | |
756 | <tr><td>1</td><td>2</td><td>3</td></tr> |
|
760 | <tr><td>1</td><td>2</td><td>3</td></tr> | |
757 | <tr><td>foo</td><td>bar</td><td>baz this list is very very very long man</td></tr> |
|
761 | <tr><td>foo</td><td>bar</td><td>baz this list is very very very long man</td></tr> | |
758 | </table> |
|
762 | </table> | |
759 |
|
||||
760 | ---------------------------------------------------------------------- |
|
763 | ---------------------------------------------------------------------- | |
761 |
|
764 |
General Comments 0
You need to be logged in to leave comments.
Login now