diff options
| author | Michael Williamson <mike@zwobble.org> | 2024-11-30 11:59:22 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2024-11-30 11:59:22 +0000 |
| commit | dc7a67c1010f0632fe532ae700cf5606d4aab230 (patch) | |
| tree | 27c46badcefa9ee272dba85a3585d931cbf998bf /mammoth/html/nodes.py | |
| parent | 8345303dee47edc246bf92449c3ae5c61969a00e (diff) | |
Add input to list of void elements
Diffstat (limited to 'mammoth/html/nodes.py')
| -rw-r--r-- | mammoth/html/nodes.py | 12 |
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 |
