Commit e53a0096 authored by Phil Hughes's avatar Phil Hughes

fixed inline math

parent 8e74fcbc
...@@ -49,10 +49,11 @@ ...@@ -49,10 +49,11 @@
.replace(/&=&/g, '\\space=\\space') .replace(/&=&/g, '\\space=\\space')
.replace(/<(\/?)em>/g, '_'); .replace(/<(\/?)em>/g, '_');
const regex = new RegExp(katexRegexString, 'gi'); const regex = new RegExp(katexRegexString, 'gi');
const matchLocation = katexString.search(regex);
const numberOfMatches = katexString.match(regex); const numberOfMatches = katexString.match(regex);
if (numberOfMatches && numberOfMatches.length !== 0) { if (numberOfMatches && numberOfMatches.length !== 0) {
if (numberOfMatches.length > 1) { if (matchLocation > 0) {
let matches = regex.exec(katexString); let matches = regex.exec(katexString);
inline = true; inline = true;
......
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