From 584f0776f73d83cdadf65e273e5a7d0e0fe2adfa Mon Sep 17 00:00:00 2001 From: sejo Date: Thu, 22 Jul 2021 20:10:30 -0500 Subject: [PATCH] skip uxn macros --- links.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/links.py b/links.py index 8ecff09..83c0cd6 100644 --- a/links.py +++ b/links.py @@ -27,7 +27,9 @@ for filename in os.listdir(): # open file and search for all outgoing links file = open(filename) for line in file: - m=re.search("^[%^]+\{.+\}",line) + if re.match("%",line) != None: # skip uxn macros (!) + continue + m=re.search("\{.+\}",line) if m: match = m.group(0) # get matched string if match not in incoming: # create a new set for that page