Change ~ to $ for latex

This commit is contained in:
cuom1999 2022-07-27 20:18:31 +07:00
parent dc8cbc6976
commit 3ed4fc7a0e

View file

@ -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]+?(?=[\\<!\[_*`~$]|\\[\[(]|https?://| {2,}\n|$)")