From 8a3db353332c4902a1154bbb0753b850b5079002 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 12 Nov 2025 22:07:58 +0000 Subject: [PATCH] Fix invalid regex in scripts/python/md-split.py The `[` character doesn't need to be escaped. The `]` character needs to be escaped as `\\]` or as `\]` in a raw string. --- scripts/python/md-split.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/python/md-split.py b/scripts/python/md-split.py index dfa324d1c..d10b91a63 100755 --- a/scripts/python/md-split.py +++ b/scripts/python/md-split.py @@ -181,7 +181,7 @@ def is_inside_code(line, indent_depth): def stripped(line): # Remove well-formed html tags, fixing mistakes by legitimate users sline = TAG_REGEX.sub('', line) - sline = re.sub('[()\[\]#*]', ' ', line) + sline = re.sub(r'[()[\]#*]', ' ', line) return sline def dedent(line, indent_depth):