Luke Plant  committed ce91f75

Fixed preview of 'div's that are actually part of content.

These divs can be inserted by post-formatting hacks.

  • Participants
  • Parent commits 3c70a84

Comments (0)

Files changed (1)

File semanticeditor/utils/

     if children and children[0].tag == 'body':
         children = children[0].getchildren()
     for n in children:
-        if n.tag == 'div':
+        if n.tag == 'div' and n not in known_nodes:
             _create_preview(n, structure, known_nodes)
             sect = known_nodes.get(n)
-            if sect is not None and (n.tag in blockdef):
+            if sect is not None and (n.tag in blockdef or n.tag == 'div'):
                 n.set('class', 'structural ' + "tag" + n.tag.lower())
                 n.tag = "div"
                 n[:] = []