Commit 8e74fcbc authored by Phil Hughes's avatar Phil Hughes

fixed spacing before inline math

parent 749b2aae
...@@ -57,7 +57,8 @@ ...@@ -57,7 +57,8 @@
inline = true; inline = true;
while (matches !== null) { while (matches !== null) {
text = `${text.replace(matches[0], katex.renderToString(matches[0].replace(/\$/g, '')))}`; const renderedKatex = katex.renderToString(matches[0].replace(/\$/g, ''));
text = `${text.replace(matches[0], ` ${renderedKatex}`)}`;
matches = regex.exec(katexString); matches = regex.exec(katexString);
} }
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment