Show More
@@ -663,6 +663,10 b' def formatblocks(blocks, width):' | |||
|
663 | 663 | text = ''.join(formatblock(b, width) for b in blocks) |
|
664 | 664 | return text |
|
665 | 665 | |
|
666 | def formatplain(blocks, width): | |
|
667 | """Format parsed blocks as plain text""" | |
|
668 | return ''.join(formatblock(b, width) for b in blocks) | |
|
669 | ||
|
666 | 670 | def format(text, width=80, indent=0, keep=None, style='plain', section=None): |
|
667 | 671 | """Parse and format the text according to width.""" |
|
668 | 672 | blocks, pruned = parse(text, indent, keep or []) |
@@ -671,7 +675,7 b' def format(text, width=80, indent=0, kee' | |||
|
671 | 675 | if style == 'html': |
|
672 | 676 | text = formathtml(blocks) |
|
673 | 677 | else: |
|
674 |
text = |
|
|
678 | text = formatplain(blocks, width=width) | |
|
675 | 679 | if keep is None: |
|
676 | 680 | return text |
|
677 | 681 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now