##// END OF EJS Templates
minirst: better interaction between comments and margins...
Martin Geisler -
r13003:876a931d default
parent child Browse files
Show More
@@ -280,6 +280,8 b' def prunecomments(blocks):'
280 280 b = blocks[i]
281 281 if b['type'] == 'paragraph' and b['lines'][0].startswith('.. '):
282 282 del blocks[i]
283 if i < len(blocks) and blocks[i]['type'] == 'margin':
284 del blocks[i]
283 285 else:
284 286 i += 1
285 287 return blocks
@@ -397,8 +399,8 b' def format(text, width, indent=0, keep=N'
397 399 blocks = hgrole(blocks)
398 400 blocks = splitparagraphs(blocks)
399 401 blocks = updatefieldlists(blocks)
402 blocks = addmargins(blocks)
400 403 blocks = prunecomments(blocks)
401 blocks = addmargins(blocks)
402 404 blocks = findadmonitions(blocks)
403 405 text = '\n'.join(formatblock(b, width) for b in blocks)
404 406 if keep is None:
@@ -425,7 +427,7 b' if __name__ == "__main__":'
425 427 blocks = debug(splitparagraphs, blocks)
426 428 blocks = debug(updatefieldlists, blocks)
427 429 blocks = debug(findsections, blocks)
430 blocks = debug(addmargins, blocks)
428 431 blocks = debug(prunecomments, blocks)
429 blocks = debug(addmargins, blocks)
430 432 blocks = debug(findadmonitions, blocks)
431 433 print '\n'.join(formatblock(b, 30) for b in blocks)
General Comments 0
You need to be logged in to leave comments. Login now