Mercurial > hg-stable
changeset 9292:01e580143423
minirst: simplify bullet list indentation computation
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sun, 02 Aug 2009 21:29:15 +0200 |
parents | cd5b6a11b607 |
children | e48a48b754d3 |
files | mercurial/minirst.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/minirst.py Sun Aug 02 17:17:17 2009 +0200 +++ b/mercurial/minirst.py Sun Aug 02 21:29:15 2009 +0200 @@ -145,7 +145,7 @@ for line in blocks[i]['lines']: if line.startswith('- '): items.append(dict(type='bullet', lines=[], - indent=blocks[i]['indent'] + 2)) + indent=blocks[i]['indent'])) line = line[2:] items[-1]['lines'].append(line) blocks[i:i+1] = items @@ -259,8 +259,8 @@ initindent = subindent = indent text = ' '.join(map(str.strip, block['lines'])) if block['type'] == 'bullet': - initindent = indent[:-2] + '- ' - subindent = indent + initindent = indent + '- ' + subindent = indent + ' ' elif block['type'] == 'option': subindent = indent + block['width'] * ' '