aboutsummaryrefslogtreecommitdiff
path: root/mammoth/html
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2024-11-30 11:59:22 +0000
committerMichael Williamson <mike@zwobble.org>2024-11-30 11:59:22 +0000
commitdc7a67c1010f0632fe532ae700cf5606d4aab230 (patch)
tree27c46badcefa9ee272dba85a3585d931cbf998bf /mammoth/html
parent8345303dee47edc246bf92449c3ae5c61969a00e (diff)
Add input to list of void elements
Diffstat (limited to 'mammoth/html')
-rw-r--r--mammoth/html/nodes.py12
1 files changed, 6 insertions, 6 deletions
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