fixed spacing before inline math

This commit is contained in:
Phil Hughes 2017-05-30 13:41:14 +01:00
parent 749b2aaec0
commit 8e74fcbc45

View file

@ -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 {