mirror of https://github.com/status-im/codimd.git
Fixed emojify should exclude parsing svg and catch its exception
This commit is contained in:
parent
ba4a7b13b3
commit
3c2a2a348b
|
@ -196,7 +196,11 @@ function finishView(view) {
|
|||
$(value).gist(viewAjaxCallback);
|
||||
});
|
||||
//emojify
|
||||
emojify.run(view[0]);
|
||||
try {
|
||||
emojify.run(view[0]);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
//mathjax
|
||||
var mathjaxdivs = view.find('.mathjax.raw').removeClass("raw").toArray();
|
||||
try {
|
||||
|
@ -652,6 +656,10 @@ function highlightRender(code, lang) {
|
|||
}
|
||||
|
||||
emojify.setConfig({
|
||||
blacklist: {
|
||||
elements: ['script', 'textarea', 'a', 'pre', 'code', 'svg'],
|
||||
classes: ['no-emojify']
|
||||
},
|
||||
img_dir: '/vendor/emojify/images',
|
||||
ignore_emoticons: true
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue