# HG changeset patch # User Matt Mackall # Date 1313118331 18000 # Node ID bb96e12a3242f3cc4ebdc01ea6eabf741d4b0630 # Parent cc669e4fec958524e3a1acc2e8d8025f6d8ebb26 minirst: only strip leading newlines, not indentation diff -r cc669e4fec95 -r bb96e12a3242 mercurial/minirst.py --- 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]