equal
deleted
inserted
replaced
2 from mercurial import minirst |
2 from mercurial import minirst |
3 |
3 |
4 def debugformat(title, text, width, **kwargs): |
4 def debugformat(title, text, width, **kwargs): |
5 print "%s formatted to fit within %d characters:" % (title, width) |
5 print "%s formatted to fit within %d characters:" % (title, width) |
6 formatted = minirst.format(text, width, **kwargs) |
6 formatted = minirst.format(text, width, **kwargs) |
7 html = minirst.formathtml(minirst.parse(text, **kwargs)[0]) |
7 html = minirst.format(text, width, style='html', **kwargs) |
8 print "-" * 70 |
8 print "-" * 70 |
9 if type(formatted) == tuple: |
9 if type(formatted) == tuple: |
10 print formatted[0] |
10 print formatted[0] |
11 print "-" * 70 |
11 print "-" * 70 |
|
12 print html |
|
13 print "-" * 70 |
12 pprint(formatted[1]) |
14 pprint(formatted[1]) |
13 else: |
15 else: |
14 print formatted |
16 print formatted |
15 print "-" * 70 |
17 print "-" * 70 |
16 print html |
18 print html |
17 print "-" * 70 |
19 print "-" * 70 |
18 print |
20 print |
19 |
21 |
20 paragraphs = """ |
22 paragraphs = """ |
21 This is some text in the first paragraph. |
23 This is some text in the first paragraph. |