fixed inline math

This commit is contained in:
Phil Hughes 2017-05-30 14:53:12 +01:00
parent 8e74fcbc45
commit e53a009629
1 changed files with 2 additions and 1 deletions

View File

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