Show More
@@ -226,18 +226,15 b' def formatblock(block, width):' | |||||
226 | initindent = subindent = indent |
|
226 | initindent = subindent = indent | |
227 | if block['type'] == 'bullet': |
|
227 | if block['type'] == 'bullet': | |
228 | m = _bulletre.match(block['lines'][0]) |
|
228 | m = _bulletre.match(block['lines'][0]) | |
229 | if m: |
|
|||
230 |
|
|
229 | subindent = indent + m.end() * ' ' | |
231 | elif block['type'] == 'field': |
|
230 | elif block['type'] == 'field': | |
232 | m = _fieldre.match(block['lines'][0]) |
|
231 | m = _fieldre.match(block['lines'][0]) | |
233 | if m: |
|
|||
234 |
|
|
232 | key, spaces, rest = m.groups() | |
235 |
|
|
233 | # Turn ":foo: bar" into "foo bar". | |
236 |
|
|
234 | block['lines'][0] = '%s %s%s' % (key, spaces, rest) | |
237 |
|
|
235 | subindent = indent + (2 + len(key) + len(spaces)) * ' ' | |
238 | elif block['type'] == 'option': |
|
236 | elif block['type'] == 'option': | |
239 | m = _optionre.match(block['lines'][0]) |
|
237 | m = _optionre.match(block['lines'][0]) | |
240 | if m: |
|
|||
241 |
|
|
238 | option, arg, rest = m.groups() | |
242 |
|
|
239 | subindent = indent + (len(option) + len(arg)) * ' ' | |
243 |
|
240 |
General Comments 0
You need to be logged in to leave comments.
Login now