forked from MarseyWorld/MarseyWorld
fix carp 500
parent
5235f592f0
commit
bed478276d
|
@ -118,6 +118,8 @@ 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 group_num == 1:
|
||||
match_str = match_str.replace('\\W', '')
|
||||
if match_str is None: return ""
|
||||
if match_str.startswith('<'):
|
||||
return match.group(group_num)
|
||||
|
|
Loading…
Reference in New Issue