# HG changeset patch # User Martin Geisler # Date 1249241355 -7200 # Node ID 01e580143423509e564c8a8f806f85920cf06e44 # Parent cd5b6a11b607e765190fbea43352c8baa7327118 minirst: simplify bullet list indentation computation diff -r cd5b6a11b607 -r 01e580143423 mercurial/minirst.py --- 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'] * ' '