changeset 19995:0f6e360b14f2 stable

minirst: do not add a 2nd empty paragraph This does not add a separating block after a separated note directive. .. note:: text is formatted to Note: text
author Simon Heimberg <simohe@besonet.ch>
date Mon, 04 Nov 2013 10:23:06 +0100
parents fc251b1a1dad
children 52b437586435
files mercurial/minirst.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/minirst.py	Mon Nov 04 10:23:06 2013 +0100
+++ b/mercurial/minirst.py	Mon Nov 04 10:23:06 2013 +0100
@@ -381,6 +381,9 @@
         if (blocks[i]['type'] == blocks[i - 1]['type'] and
             blocks[i]['type'] in ('bullet', 'option', 'field')):
             i += 1
+        elif not blocks[i - 1]['lines']:
+            # no lines in previous block, do not seperate
+            i += 1
         else:
             blocks.insert(i, dict(lines=[''], indent=0, type='margin'))
             i += 2