##// END OF EJS Templates
adding seemingly simple fix for inline-block-inline maths
Nicholas Bollweg -
Show More
@@ -23,7 +23,7 b' from IPython.utils.decorators import undoc'
23
23
24 @undoc
24 @undoc
25 class MathBlockGrammar(mistune.BlockGrammar):
25 class MathBlockGrammar(mistune.BlockGrammar):
26 block_math = re.compile("^\$\$(.*?)\$\$", re.DOTALL)
26 block_math = re.compile("^\$\$([^\$]*?)\$\$", re.DOTALL)
27 latex_environment = re.compile(r"^\\begin\{([a-z]*\*?)\}(.*?)\\end\{\1\}",
27 latex_environment = re.compile(r"^\\begin\{([a-z]*\*?)\}(.*?)\\end\{\1\}",
28 re.DOTALL)
28 re.DOTALL)
29
29
@@ -52,7 +52,7 b' class MathBlockLexer(mistune.BlockLexer):'
52
52
53 @undoc
53 @undoc
54 class MathInlineGrammar(mistune.InlineGrammar):
54 class MathInlineGrammar(mistune.InlineGrammar):
55 math = re.compile("^\$(.+?)\$")
55 math = re.compile("^\$([^\$]+?)\$")
56 text = re.compile(r'^[\s\S]+?(?=[\\<!\[_*`~$]|https?://| {2,}\n|$)')
56 text = re.compile(r'^[\s\S]+?(?=[\\<!\[_*`~$]|https?://| {2,}\n|$)')
57
57
58 @undoc
58 @undoc
General Comments 0
You need to be logged in to leave comments. Login now