Mercurial > hg
changeset 15036:bb96e12a3242
minirst: only strip leading newlines, not indentation
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 11 Aug 2011 22:05:31 -0500 |
parents | cc669e4fec95 |
children | df47381b41d6 |
files | mercurial/minirst.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/minirst.py Thu Aug 11 14:34:03 2011 -0500 +++ b/mercurial/minirst.py Thu Aug 11 22:05:31 2011 -0500 @@ -39,7 +39,7 @@ has an 'indent' field and a 'lines' field. """ blocks = [] - for b in _blockre.split(text.strip()): + for b in _blockre.split(text.lstrip('\n').rstrip()): lines = b.splitlines() indent = min((len(l) - len(l.lstrip())) for l in lines) lines = [l[indent:] for l in lines]