mercurial/minirst.py
changeset 15013 4a1e3c761ec7
parent 15012 ee766af457ed
child 15014 a814e986859f
equal deleted inserted replaced
15012:ee766af457ed 15013:4a1e3c761ec7
   450     blocks = addmargins(blocks)
   450     blocks = addmargins(blocks)
   451     blocks = prunecomments(blocks)
   451     blocks = prunecomments(blocks)
   452     blocks = findadmonitions(blocks)
   452     blocks = findadmonitions(blocks)
   453     return blocks, pruned
   453     return blocks, pruned
   454 
   454 
       
   455 def formatblocks(blocks, width):
       
   456     text = '\n'.join(formatblock(b, width) for b in blocks)
       
   457     return text
       
   458 
   455 def format(text, width, indent=0, keep=None):
   459 def format(text, width, indent=0, keep=None):
   456     """Parse and format the text according to width."""
   460     """Parse and format the text according to width."""
   457     blocks, pruned = parse(text, indent, keep or [])
   461     blocks, pruned = parse(text, indent, keep or [])
   458     text = '\n'.join(formatblock(b, width) for b in blocks)
   462     text = '\n'.join(formatblock(b, width) for b in blocks)
   459     if keep is None:
   463     if keep is None: