summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/js/extra.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/public/js/extra.js b/public/js/extra.js
index a6576991..2c9c9037 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -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
});