From dc7a67c1010f0632fe532ae700cf5606d4aab230 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 30 Nov 2024 11:59:22 +0000 Subject: Add input to list of void elements --- mammoth/html/nodes.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mammoth') diff --git a/mammoth/html/nodes.py b/mammoth/html/nodes.py index 9c07259..21e6f47 100644 --- a/mammoth/html/nodes.py +++ b/mammoth/html/nodes.py @@ -16,7 +16,7 @@ class Tag(object): attributes = cobble.field() collapsible = cobble.field() separator = cobble.field() - + @property def tag_name(self): return self.tag_names[0] @@ -26,11 +26,11 @@ class Tag(object): class Element(Node): tag = cobble.field() children = cobble.field() - + @property def tag_name(self): return self.tag.tag_name - + @property def tag_names(self): return self.tag.tag_names @@ -38,16 +38,16 @@ class Element(Node): @property def attributes(self): return self.tag.attributes - + @property def collapsible(self): return self.tag.collapsible - + @property def separator(self): return self.tag.separator - _VOID_TAG_NAMES = set(["br", "hr", "img"]) + _VOID_TAG_NAMES = set(["br", "hr", "img", "input"]) def is_void(self): return not self.children and self.tag_name in self._VOID_TAG_NAMES -- cgit v1.2.3