diff options
author | Wu Cheng-Han | 2018-01-19 00:53:49 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2018-01-19 00:53:49 +0800 |
commit | 3703b12584edf3e7c43e957658817cf15e149b86 (patch) | |
tree | 7aa2e7fa2ff12afbf9bf4a8e018982d6d467fb8a | |
parent | 11a5dd0eb42f5c3da81e07bcf33779bd29063f99 (diff) |
Fix image alt not render properly
-rw-r--r-- | public/js/extra.js | 3 |
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') |