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

fixed spacing before inline math

parent 749b2aae
......@@ -57,7 +57,8 @@
inline = true;
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);
}
} 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