bugfix: redaction regEx

This commit is contained in:
Jörn-Michael Miehe 2025-05-12 23:49:51 +00:00
parent fbc76e969f
commit b1a13911c2

View file

@ -15,8 +15,8 @@ txt = Path(args.file).read_text()
# redaction syntax # redaction syntax
import re import re
inlinepat = re.compile(r"\(\(\((([^>]*?):::)?(.*?)\)\)\)", re.MULTILINE|re.DOTALL) inlinepat = re.compile(r"\(\(\((?:(.+?):::)?(.+?)\)\)\)", re.MULTILINE|re.DOTALL)
tokenpat = re.compile(r"\[redact(:::(.*?))?\](.*?)\[\/redact\]", re.MULTILINE|re.DOTALL) tokenpat = re.compile(r"\[redact(:::(.+?))?\](.+?)\[\/redact\]", re.MULTILINE|re.DOTALL)
# match handling # match handling
def subredact(match): def subredact(match):