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

login
register
mail settings
Submitter Simon Heimberg
Date Nov. 2, 2013, 11:36 a.m.
Message ID <d6c56b64a342cbf3a75e.1383392163@lapsi.heimberg.home>
Download mbox | patch
Permalink /patch/2841/
State Superseded, archived
Headers show

Comments

Simon Heimberg - Nov. 2, 2013, 11:36 a.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1383387952 -3600
#      Sat Nov 02 11:25:52 2013 +0100
# Branch stable
# Node ID d6c56b64a342cbf3a75e8280e528c842ea570ed9
# Parent  9949d93cb1e4d43dd1579ad7b7ee3f73e305ff72
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 9949d93cb1e4 -r d6c56b64a342 mercurial/minirst.py
--- a/mercurial/minirst.py	Sat Nov 02 11:25:52 2013 +0100
+++ b/mercurial/minirst.py	Sat Nov 02 11:25:52 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):