From b34f7280c0754f9fc88725358e22ac46d9a2a598 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 14 Mar 2016 18:56:42 +0000 Subject: Add collapsing of HTML nodes --- mammoth/html/nodes.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mammoth/html/nodes.py') diff --git a/mammoth/html/nodes.py b/mammoth/html/nodes.py index aae4888..a5a5bde 100644 --- a/mammoth/html/nodes.py +++ b/mammoth/html/nodes.py @@ -16,6 +16,10 @@ class Element(Node): attributes = cobble.field() children = cobble.field() collapsible = cobble.field() + + @property + def tag_name(self): + return self.tag_names[0] @cobble.data -- cgit v1.2.3