Skip to content

Commit

Permalink
fix: Latex formula parse error
Browse files Browse the repository at this point in the history
Fix the error when parsing latex formulas.
Using the same mechanism as mathjax

#taskid 4878
  • Loading branch information
carla-at-wiris committed Oct 3, 2022
1 parent f6d073f commit 5d0f631
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Y.namespace('M.atto_wiris').Button = Y.Base.create('button', Y.M.editor_atto.Edi
var html = host.editor.get('innerHTML');
// Check if exist mathml tag for parse.
if (html.indexOf('math»') >= 0 || html.indexOf('math>') >= 0) {
host.textarea.set('value', WirisPlugin.Parser.endParse(html, null, this.config.lang, true));
host.textarea.set('value', WirisPlugin.Parser.endParseSaveMode(html, null, this.config.lang, true));
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Y.namespace('M.atto_wiris').Button = Y.Base.create('button', Y.M.editor_atto.Edi
var html = host.editor.get('innerHTML');
// Check if exist mathml tag for parse.
if (html.indexOf('math»') >= 0 || html.indexOf('math>') >= 0) {
host.textarea.set('value', WirisPlugin.Parser.endParse(html, null, this.config.lang, true));
host.textarea.set('value', WirisPlugin.Parser.endParseSaveMode(html, null, this.config.lang, true));
}
};

Expand Down
2 changes: 1 addition & 1 deletion yui/src/button/js/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Y.namespace('M.atto_wiris').Button = Y.Base.create('button', Y.M.editor_atto.Edi
var html = host.editor.get('innerHTML');
// Check if exist mathml tag for parse.
if (html.indexOf('math»') >= 0 || html.indexOf('math>') >= 0) {
host.textarea.set('value', WirisPlugin.Parser.endParse(html, null, this.config.lang, true));
host.textarea.set('value', WirisPlugin.Parser.endParseSaveMode(html, null, this.config.lang, true));
}
};

Expand Down

0 comments on commit 5d0f631

Please sign in to comment.