From a465b409b1c568277a2666e61bb9536f6b501bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Thu, 12 Jan 2023 00:18:46 +0100 Subject: [PATCH] Print a warning and avoid crash on orgit-rev links. --- scripts/generate.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/generate.py b/scripts/generate.py index 6c16b99..571b38e 100644 --- a/scripts/generate.py +++ b/scripts/generate.py @@ -578,7 +578,9 @@ def render_text_tokens(tokens, acc, headline, graph): link_target = './' + target_headline.id + '.node.html' else: is_internal_link = False - if not ( + if link_target.startswith('orgit-rev'): + raise NonExistingLocalNoteError(link_target, headline) + elif not ( link_target.startswith('https://') or link_target.startswith('http://') or link_target.startswith('/')