We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa54b52 commit 6f87529Copy full SHA for 6f87529
src/render.js
@@ -57,6 +57,12 @@ export function init () {
57
}
58
return `<p>${text}</p>`
59
60
+ renderer.image = function (href, title, text) {
61
+ const url = /:/.test(href) ? href : ($docsify.basePath + href).replace(/\/+/g, '/')
62
+ const titleHTML = title ? ` title="${title}"` : ''
63
+
64
+ return `<img src="${url}" alt="${text}"${titleHTML} />`
65
+ }
66
67
if (typeof $docsify.markdown === 'function') {
68
markdown.setOptions({ renderer })
src/util.js
@@ -164,4 +164,3 @@ export function emojify (text) {
164
.replace(/:(\w*?):/ig, '<img class="emoji" src="https://assets-cdn.github.com/images/icons/emoji/$1.png" alt="$1" />')
165
.replace(/__colon__/g, ':')
166
167
-
0 commit comments