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]+?(?=[\\