File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010__all__ = ["math" , "math_in_quote" , "math_in_list" ]
1111
1212BLOCK_MATH_PATTERN = r"^ {0,3}\$\$[ \t]*\n(?P<math_text>[\s\S]+?)\n\$\$[ \t]*$"
13- INLINE_MATH_PATTERN = r"\$(?!\s)(?P<math_text>. +?)(?!\s)\$"
13+ INLINE_MATH_PATTERN = r"\$(?!\s)(?P<math_text>(?:[^$\\]|\\.) +?)(?!\s)\$"
1414
1515
1616def parse_block_math (block : "BlockParser" , m : Match [str ], state : "BlockState" ) -> int :
Original file line number Diff line number Diff line change @@ -55,3 +55,9 @@ with $a\neq b$ such that $f(a)=f(b)$.
5555singleton set <span class="math">\(e_G\)</span>, because otherwise <span class="math">\(\exists a,b\in G\)</span>
5656with <span class="math">\(a\neq b\)</span> such that <span class="math">\(f(a)=f(b)\)</span>.</p>
5757````````````````````````````````
58+
59+ ```````````````````````````````` example
60+ Escaped dollar sign in math: $x=\$$
61+ .
62+ <p>Escaped dollar sign in math: <span class="math">\(x=\$\)</span></p>
63+ ````````````````````````````````
You can’t perform that action at this time.
0 commit comments