From 5e31b51843f3c579fdc4080bd040132bd72ba27e Mon Sep 17 00:00:00 2001 From: Jakob Cornell Date: Wed, 28 Sep 2022 22:27:00 -0500 Subject: [PATCH] Fix HTML flattening bug --- strikebot/src/strikebot/updates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strikebot/src/strikebot/updates.py b/strikebot/src/strikebot/updates.py index 31d9cd0..5eb3c00 100644 --- a/strikebot/src/strikebot/updates.py +++ b/strikebot/src/strikebot/updates.py @@ -35,7 +35,7 @@ def parse_update(payload_data: dict, curr_count: Optional[int], bot_user: str) - # flatten the update content to plain text tree = BeautifulSoup(payload_data["body_html"], "html.parser") - worklist = tree.contents + worklist = list(reversed(tree.contents)) out = [[]] while worklist: el = worklist.pop() -- 2.30.2