Mercurial > public > mercurial-scm > hg-stable
diff mercurial/minirst.py @ 9417:4c3fb45123e5
util, minirst: do not crash with COLUMNS=0
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Thu, 03 Sep 2009 21:07:06 +0200 |
parents | e48a48b754d3 |
children | cad36e496640 |
line wrap: on
line diff
--- a/mercurial/minirst.py Thu Sep 03 02:42:56 2009 +0200 +++ b/mercurial/minirst.py Thu Sep 03 21:07:06 2009 +0200 @@ -279,6 +279,8 @@ def formatblock(block, width): """Format a block according to width.""" + if width <= 0: + width = 78 indent = ' ' * block['indent'] if block['type'] == 'margin': return ''