diff options
author | cel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519> | 2021-01-14 20:24:18 -0500 |
---|---|---|
committer | cel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519> | 2021-01-14 20:24:18 -0500 |
commit | 44ee859ad60c38deae338671f4fc1b3f3d665ec9 (patch) | |
tree | b74397d07ba261c3c7f9a661e3c4407464dcb952 /lib/render.js | |
parent | 995c0fbf37398ddeafe6eddc7b61137090601b3a (diff) | |
download | patchfoo-44ee859ad60c38deae338671f4fc1b3f3d665ec9.tar.gz patchfoo-44ee859ad60c38deae338671f4fc1b3f3d665ec9.zip |
Truncate image alt text
Reduce horizontal scrollbar
Diffstat (limited to 'lib/render.js')
-rw-r--r-- | lib/render.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/render.js b/lib/render.js index 91bd2ab..1777c88 100644 --- a/lib/render.js +++ b/lib/render.js @@ -41,6 +41,7 @@ MdRenderer.prototype.urltransform = function (href) { MdRenderer.prototype.image = function (ref, title, text) { if (ref[0] !== '&') return this.link(ref, title, text) var alt = this.render.getImageAlt(ref, text) + if (alt.length > 60) alt = alt.substr(0, 60) + '…' return (/^video:/.test(text) ? h('video', { controls: 'controls', src: this.render.toUrl(ref), |