aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-09-24 19:29:19 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-09-24 19:29:19 -1000
commitfc8772e0891532f8ed7117f9d253c59aa170a173 (patch)
tree64e84d026c2a42722aa11eb8e7eda850ee6c9a81 /lib
parent047e5cb16c3c236e356818f8d6fd979e94dadce6 (diff)
downloadpatchfoo-fc8772e0891532f8ed7117f9d253c59aa170a173.tar.gz
patchfoo-fc8772e0891532f8ed7117f9d253c59aa170a173.zip
Image alt text: note mime/type if lacks extension
Diffstat (limited to 'lib')
-rw-r--r--lib/render.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/render.js b/lib/render.js
index 32085e4..15d7783 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -182,6 +182,7 @@ Render.prototype.getImageAlt = function (id, fallback) {
var name = u.unescapeHTML(link.name || fallback)
return name
+ (link.size != null ? ' (' + this.formatSize(link.size) + ')' : '')
+ + (link.type && !/\.\S+$/.test(name) ? ' [' + link.type + ']' : '')
}
Render.prototype.formatSize = function (size) {