##// END OF EJS Templates
minirst: prepare for general types of bullet lists...
Martin Geisler -
r9738:f52c4f7a default
parent child Browse files
Show More
@@ -94,9 +94,10 b' def findliteralblocks(blocks):'
94 # correct for this here while we still have the original
94 # correct for this here while we still have the original
95 # information on the indentation of the subsequent literal
95 # information on the indentation of the subsequent literal
96 # blocks available.
96 # blocks available.
97 if blocks[i]['lines'][0].startswith('- '):
97 m = _bulletre.match(blocks[i]['lines'][0])
98 indent += 2
98 if m:
99 adjustment -= 2
99 indent += m.end()
100 adjustment -= m.end()
100
101
101 # Mark the following indented blocks.
102 # Mark the following indented blocks.
102 while i+1 < len(blocks) and blocks[i+1]['indent'] > indent:
103 while i+1 < len(blocks) and blocks[i+1]['indent'] > indent:
@@ -220,7 +221,9 b' def formatblock(block, width):'
220 subsequent_indent=defindent))
221 subsequent_indent=defindent))
221 initindent = subindent = indent
222 initindent = subindent = indent
222 if block['type'] == 'bullet':
223 if block['type'] == 'bullet':
223 subindent = indent + ' '
224 m = _bulletre.match(block['lines'][0])
225 if m:
226 subindent = indent + m.end() * ' '
224 elif block['type'] == 'field':
227 elif block['type'] == 'field':
225 m = _fieldre.match(block['lines'][0])
228 m = _fieldre.match(block['lines'][0])
226 if m:
229 if m:
General Comments 0
You need to be logged in to leave comments. Login now