From 41339034607482ccfda1d5b08cc81aa52e8cd61a Mon Sep 17 00:00:00 2001 From: zenfyr Date: Thu, 7 May 2026 03:41:41 +0700 Subject: [PATCH] fix: stupid bad no good depth logic --- util/html.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/html.py b/util/html.py index b0e3d43..1d0a7fe 100644 --- a/util/html.py +++ b/util/html.py @@ -83,10 +83,10 @@ class HTMLToTokensParser(HTMLParser): def handle_endtag(self, tag: str) -> None: if self.invisible: if tag == self.invisible: - if self.invisible_depth == 0: + if self.invisible_depth <= 0: self.invisible = None else: - self.invisible_depth = -1 + self.invisible_depth -= 1 return match tag: -- 2.51.2