From 3ed4fc7a0ea285b367c68b127a6f8defbc957d53 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Wed, 27 Jul 2022 20:18:31 +0700 Subject: [PATCH] Change ~ to $ for latex --- judge/jinja2/markdown/math.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/judge/jinja2/markdown/math.py b/judge/jinja2/markdown/math.py index 1b5f4ce..8063ab6 100644 --- a/judge/jinja2/markdown/math.py +++ b/judge/jinja2/markdown/math.py @@ -11,7 +11,7 @@ mistune._pre_tags.append("latex") class MathInlineGrammar(mistune.InlineGrammar): block_math = re.compile(r"^\$\$(.*?)\$\$|^\\\[(.*?)\\\]", re.DOTALL) - math = re.compile(r"^~(.*?)~|^\\\((.*?)\\\)", re.DOTALL) + math = re.compile(r"^~(.*?)~|\$(.*?)\$|^\\\((.*?)\\\)", re.DOTALL) text = re.compile(r"^[\s\S]+?(?=[\\