markdown-it: MathJax support $.$ in \text{} within $$...$$

This commit is contained in:
Le Tan 2018-10-31 22:11:40 +08:00
parent bdf4e10c6e
commit 4ae4960358
2 changed files with 3 additions and 2 deletions

View File

@ -1873,3 +1873,4 @@ var clearMarkRectDivs = function() {
var startFreshRender = function() {
skipScrollCheckRange = null;
};

View File

@ -161,12 +161,12 @@ texmath.rules = {
],
block: [
{ name: 'math_block_eqno',
rex: /\${2}([^$]*?)\${2}\s*?\(([^)$\r\n]+?)\)\s*$/gmy,
rex: /\${2}((?:[^$]|\$(?!\$))*?)\${2}\s*?\(([^)$\r\n]+?)\)\s*$/gmy,
tmpl: '<x-eqs><x-eqn class="tex-to-render">$1</x-eqn><span>($2)</span></x-eqs>',
tag: '$$'
},
{ name: 'math_block',
rex: /\${2}([^$]*?)\${2}\s*$/gmy,
rex: /\${2}((?:[^$]|\$(?!\$))*?)\${2}\s*$/gmy,
tmpl: '<x-eqn class="tex-to-render">$1</x-eqn>',
tag: '$$'
}