Browse Source

empty dictionaries are also falsy...

pull/67/head
adam j hartz 1 month ago
parent
commit
38801b4886
Signed by: hz <hartz@mit.edu> GPG Key ID: 5FDD2840E179AD62
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      catsoop/language.py

+ 1
- 1
catsoop/language.py View File

@@ -820,7 +820,7 @@ def handle_custom_tags(context, text):
tree = BeautifulSoup(text, "html.parser")

# remove conditional includes that aren't falsy
FALSY = {"0", "false", "", "[]", "()", "set()"}
FALSY = {"0", "false", "", "[]", "()", "set()", "{}"}
for t in tree.find_all(["div", "span", "p"]):
if (
t.get("cs-hide-if", "false").lower() not in FALSY


Loading…
Cancel
Save