Skip to content

Commit 6055acb

Browse files
committed
fix #19 missing start tag error
1 parent 9456562 commit 6055acb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

telegraph/utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ def handle_endtag(self, tag):
8383
if tag in VOID_ELEMENTS:
8484
return
8585

86+
if not len(self.parent_nodes):
87+
raise InvalidHTML('"{}" missing start tag'.format(
88+
tag
89+
))
90+
8691
self.current_nodes = self.parent_nodes.pop()
8792

8893
last_node = self.current_nodes[-1]

0 commit comments

Comments
 (0)