--- a/mercurial/minirst.py Sun Aug 05 11:39:52 2018 +0900
+++ b/mercurial/minirst.py Sun Aug 05 11:43:05 2018 +0900
@@ -663,6 +663,10 @@
text = ''.join(formatblock(b, width) for b in blocks)
return text
+def formatplain(blocks, width):
+ """Format parsed blocks as plain text"""
+ return ''.join(formatblock(b, width) for b in blocks)
+
def format(text, width=80, indent=0, keep=None, style='plain', section=None):
"""Parse and format the text according to width."""
blocks, pruned = parse(text, indent, keep or [])
@@ -671,7 +675,7 @@
if style == 'html':
text = formathtml(blocks)
else:
- text = ''.join(formatblock(b, width) for b in blocks)
+ text = formatplain(blocks, width=width)
if keep is None:
return text
else: