Mercurial > hg
changeset 13009:54be08fa4d1d
minirst: modified minirst to also recognize empty comments.
The modifies minirst to also handle empty comments. An empty comment
is a block with a single line containing two dots.
author | Erik Zielke <ez@aragost.com> |
---|---|
date | Tue, 16 Nov 2010 13:29:08 +0100 |
parents | ac627ab0b3a5 |
children | 6bdae8ea0b48 |
files | mercurial/minirst.py tests/test-minirst.py tests/test-minirst.py.out |
diffstat | 3 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/minirst.py Wed Nov 17 09:17:55 2010 +0100 +++ b/mercurial/minirst.py Tue Nov 16 13:29:08 2010 +0100 @@ -278,7 +278,8 @@ i = 0 while i < len(blocks): b = blocks[i] - if b['type'] == 'paragraph' and b['lines'][0].startswith('.. '): + if b['type'] == 'paragraph' and (b['lines'][0].startswith('.. ') or + b['lines'] == ['..']): del blocks[i] if i < len(blocks) and blocks[i]['type'] == 'margin': del blocks[i]