escape backslashes

This commit is contained in:
dousha 2025-01-06 02:20:20 +08:00
parent ce94c70363
commit 00ba71b3e3

View File

@ -107,7 +107,8 @@ for item in items:
lines[i + 1] = nextline lines[i + 1] = nextline
content = '\n'.join(lines) content = '\n'.join(lines)
content = md(content, code_language_callback=code_parser).strip() + '\n' content = md(content, code_language_callback=code_parser,
escape_misc=True).strip() + '\n'
ref_regex = re.compile(r'\[ref](.+?)\[/ref]') ref_regex = re.compile(r'\[ref](.+?)\[/ref]')
refs = [] refs = []
stuff = find_all_matches(ref_regex, content, 1) stuff = find_all_matches(ref_regex, content, 1)