Skip to content

Commit

Permalink
show error when parsing with KaTeX (#1738)
Browse files Browse the repository at this point in the history
  • Loading branch information
arrocke authored and jhchen committed Oct 5, 2017
1 parent 098bb73 commit 26896cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/formula.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ class FormulaBlot extends Embed {
static create(value) {
let node = super.create(value);
if (typeof value === 'string') {
window.katex.render(value, node);
window.katex.render(value, node, {
throwOnError: false,
errorColor: '#f00'
});
node.setAttribute('data-value', value);
}
return node;
Expand Down

0 comments on commit 26896cc

Please sign in to comment.