allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jetm...@apache.org
Subject [5/5] git commit: [#4771] ticket:635 Don't strip wrapping <div> together with <p> 'cause <div> is important
Date Tue, 26 Aug 2014 14:39:48 GMT
[#4771] ticket:635 Don't strip wrapping <div> together with <p> 'cause <div>
is important


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/dd961bc4
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/dd961bc4
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/dd961bc4

Branch: refs/heads/je/42cc_4771
Commit: dd961bc4fbc4b6781dd15f2344a01e26d7f06659
Parents: 7222700
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Tue Aug 26 16:48:59 2014 +0300
Committer: Igor Bondarenko <jetmind2@gmail.com>
Committed: Tue Aug 26 16:48:59 2014 +0300

----------------------------------------------------------------------
 Allura/allura/lib/markdown_extensions.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/dd961bc4/Allura/allura/lib/markdown_extensions.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/markdown_extensions.py b/Allura/allura/lib/markdown_extensions.py
index 024eca1..5b0542d 100644
--- a/Allura/allura/lib/markdown_extensions.py
+++ b/Allura/allura/lib/markdown_extensions.py
@@ -595,18 +595,19 @@ class ForgeMacroIncludeTreeProcessor(markdown.treeprocessors.Treeprocessor):
     <p><div><div class="markdown_content">...</div></div></p>
 
     To:
-    <div class="markdown_content">...</div>
+    <div><div class="markdown_content">...</div></div>
     '''
 
     def _get_include(self, p):
         children = p.getchildren()
         if len(children) != 1 or children[0].tag != 'div':
             return
-        children = children[0].getchildren()
+        parent = children[0]
+        children = parent.getchildren()
         if len(children) != 1 or children[0].tag != 'div':
             return
         if children[0].get('class') == 'markdown_content':
-            return children[0]
+            return parent
 
     def run(self, root):
         p_with_parent = [(tag, parent)


Mime
View raw message