##// END OF EJS Templates
minirst: simplify bullet list indentation computation
Martin Geisler -
r9292:01e58014 default
parent child Browse files
Show More
@@ -145,7 +145,7 b' def findbulletlists(blocks):'
145 145 for line in blocks[i]['lines']:
146 146 if line.startswith('- '):
147 147 items.append(dict(type='bullet', lines=[],
148 indent=blocks[i]['indent'] + 2))
148 indent=blocks[i]['indent']))
149 149 line = line[2:]
150 150 items[-1]['lines'].append(line)
151 151 blocks[i:i+1] = items
@@ -259,8 +259,8 b' def formatblock(block, width):'
259 259 initindent = subindent = indent
260 260 text = ' '.join(map(str.strip, block['lines']))
261 261 if block['type'] == 'bullet':
262 initindent = indent[:-2] + '- '
263 subindent = indent
262 initindent = indent + '- '
263 subindent = indent + ' '
264 264 elif block['type'] == 'option':
265 265 subindent = indent + block['width'] * ' '
266 266
General Comments 0
You need to be logged in to leave comments. Login now