Commits

Georg Brandl committed 8326a6b

Monkey-patch docutils.nodes.Element.copy to copy the rawsource.

Comments (0)

Files changed (1)

sphinx/util/nodes.py

     return key in self.children
 
 nodes.Node.__contains__ = _new_contains
+
+# monkey-patch Element.copy to copy the rawsource
+
+def _new_copy(self):
+    return self.__class__(self.rawsource, **self.attributes)
+
+nodes.Element.copy = _new_copy