From 2d0f71bca10f11cbde77c4d14a59ebe48722a031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Wed, 14 Dec 2022 23:55:30 +0100 Subject: [PATCH] Hide "ATTACH" tags. --- scripts/generate.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/generate.py b/scripts/generate.py index 2030578..589d4f3 100644 --- a/scripts/generate.py +++ b/scripts/generate.py @@ -37,13 +37,14 @@ EXTENSIONS = [ ".org", ".org.txt", ] -IMG_EXTENSIONS = [ +IMG_EXTENSIONS = set([ "svg", "png", "jpg", "jpeg", "gif", -] +]) +SKIPPED_TAGS = set(['attach']) WATCH = True if os.getenv('WATCH_AND_REBUILD', '1') == '0': @@ -714,7 +715,8 @@ def render(headline, doc, graph, headlineLevel): tag_list = [] for tag in headline.shallow_tags: - tag_list.append(f'{html.escape(tag)}') + if tag.lower() not in SKIPPED_TAGS: + tag_list.append(f'{html.escape(tag)}') tags = f'{"".join(tag_list)}' display_state = 'expanded'