Roger Haase  committed 7f93823

eliminate double wrapping of transcluded svg items

  • Participants
  • Parent commits ee2eb76
  • Branches default

Comments (0)

Files changed (2)

File MoinMoin/converter/_tests/

         update_item(u'page1', {CONTENTTYPE: u'text/'}, u'{{logo}}')
         rendered = Item.create(u'page1').content._render_data()
-        assert '<img alt="logo" class="moin-transclusion"' in rendered
+        assert '<div class="moin-transclusion" data-href="/logo"><img alt="logo"' in rendered
         # <p /> is not valid html5; should be <p></p>. to be valid.  Even better, there should be no empty p's.
         update_item(u'page1', {CONTENTTYPE: u'text/'}, u'{{logo}}{{logo}}')

File MoinMoin/converter/

                 attrib[html.controls] = 'controls'
             new_elem = self.new_copy(getattr(html, obj_type), elem, attrib)
-        return mark_item_as_transclusion(new_elem, href)
+        if obj_type == "object" and href.scheme:
+            # items similar to {{}} are marked here, other objects are marked in
+            return mark_item_as_transclusion(new_elem, href)
+        return new_elem
     def visit_moinpage_p(self, elem):
         return self.new_copy(html.p, elem)