mercurial/minirst.py
changeset 15262 e8076af14498
parent 15261 e2df5b866d22
child 15393 87bb6b7644f6
--- a/mercurial/minirst.py	Sat Oct 15 00:39:01 2011 -0500
+++ b/mercurial/minirst.py	Sat Oct 15 00:39:04 2011 -0500
@@ -608,10 +608,13 @@
     text = ''.join(formatblock(b, width) for b in blocks)
     return text
 
-def format(text, width, indent=0, keep=None):
+def format(text, width=80, indent=0, keep=None, style='plain'):
     """Parse and format the text according to width."""
     blocks, pruned = parse(text, indent, keep or [])
-    text = ''.join(formatblock(b, width) for b in blocks)
+    if style == 'html':
+        text = formathtml(blocks)
+    else:
+        text = ''.join(formatblock(b, width) for b in blocks)
     if keep is None:
         return text
     else: