From bf448a557ea8ca81e8483ffebb9b662c4328f42e Mon Sep 17 00:00:00 2001 From: justcool393 Date: Thu, 3 Nov 2022 18:22:47 -0500 Subject: [PATCH] fix *another* 500 --- files/helpers/regex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/regex.py b/files/helpers/regex.py index 7ccc84837..ebb9b7b0a 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -118,9 +118,9 @@ knowledgebase_page_regex = re.compile("[a-zA-Z0-9_\-]+", flags=re.A) def sub_matcher(match:re.Match, upper=False, replace_with:Union[dict[str, str], dict[str, List[str]]]=SLURS): group_num = 0 if len(match.groups()) == 0 else 1 match_str = match.group(group_num) + if match_str is None: return "" if group_num == 1: match_str = match_str.replace('\\W', '') - if match_str is None: return "" if match_str.startswith('<'): return match.group(group_num) else: