Fix invalid regex in scripts/python/md-split.py (#2303)

The `[` character doesn't need to be escaped.

The `]` character needs to be escaped as `\\]` or as `\]` in a raw string.
pull/2306/head
Jonathan Wakely 2 months ago committed by GitHub
parent ee52a86110
commit 3088cf4f1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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):

Loading…
Cancel
Save