summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-01-19 14:26:06 +0100
committerGitHub2018-01-19 14:26:06 +0100
commitd492070d3a3bb32c37cc90fcb3e96182a4f1edc9 (patch)
tree32b3ed166589d5b30fbad6aa2fb5d66b8588edaa /public/js
parenta0fdfccb22c32352b41896de1107684c3112b0af (diff)
parent3703b12584edf3e7c43e957658817cf15e149b86 (diff)
Merge pull request #685 from hackmdio/fixImageAlt
Fix image alt not render properly Fixes #638
Diffstat (limited to '')
-rw-r--r--public/js/extra.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/public/js/extra.js b/public/js/extra.js
index 75aa29af..ec7d39da 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -1007,9 +1007,10 @@ md.use(markdownitContainer, 'info', { render: renderContainer })
md.use(markdownitContainer, 'warning', { render: renderContainer })
md.use(markdownitContainer, 'danger', { render: renderContainer })
+let defaultImageRender = md.renderer.rules.image
md.renderer.rules.image = function (tokens, idx, options, env, self) {
tokens[idx].attrJoin('class', 'raw')
- return self.renderToken(...arguments)
+ return defaultImageRender(...arguments)
}
md.renderer.rules.list_item_open = function (tokens, idx, options, env, self) {
tokens[idx].attrJoin('class', 'raw')