diff --git a/test.py b/test.py index 62550b0..bdb2a6a 100644 --- a/test.py +++ b/test.py @@ -329,8 +329,7 @@ def do_table_line(state, line): print(f'depth = {depth}'); elif (m := re.match("", line)): content += m.group(0); - depth -= 1; - if depth < 0: raise SyntaxError("negative depth; bad HTML"); + if depth > 0: depth -= 1; line = line[len(m.group(0)):] print(f'line = "{line}"'); print(f'depth = {depth}');