Patchwork [3,of,8] minirst: find admonitions before pruning comments and adding margins

login
register
mail settings
Submitter Simon Heimberg
Date Nov. 5, 2013, 8:06 a.m.
Message ID <396da61610f78a8374a5.1383638794@lapsi.heimberg.home>
Download mbox | patch
Permalink /patch/2851/
State Accepted
Commit fc251b1a1dad8cd72d4322c4c632a0cf4901d08b
Headers show

Comments

Simon Heimberg - Nov. 5, 2013, 8:06 a.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1383556986 -3600
#      Mon Nov 04 10:23:06 2013 +0100
# Branch stable
# Node ID 396da61610f78a8374a58550cc0f00878133fa9d
# Parent  0459044d01ca779b9f6ced6857bc9ec07538540b
minirst: find admonitions before pruning comments and adding margins

Lines with only a directive are not deleted anymore because they are detected
before comments are deleted by prunecomments().
addmargins() will be adapted later.

Patch

diff -r 0459044d01ca -r 396da61610f7 mercurial/minirst.py
--- a/mercurial/minirst.py	Mon Nov 04 10:23:06 2013 +0100
+++ b/mercurial/minirst.py	Mon Nov 04 10:23:06 2013 +0100
@@ -633,9 +633,9 @@ 
     blocks = splitparagraphs(blocks)
     blocks = updatefieldlists(blocks)
     blocks = updateoptionlists(blocks)
+    blocks = findadmonitions(blocks)
     blocks = addmargins(blocks)
     blocks = prunecomments(blocks)
-    blocks = findadmonitions(blocks)
     return blocks, pruned
 
 def formatblocks(blocks, width):