aboutsummaryrefslogtreecommitdiff
path: root/lib/render.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/render.js')
-rw-r--r--lib/render.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/render.js b/lib/render.js
index afb181f..862cfd9 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -181,8 +181,8 @@ Render.prototype.getImageAlt = function (id, fallback) {
if (!link) return fallback
var name = u.unescapeHTML(link.name || fallback)
return name
- + (link.size != null ? ' (' + this.formatSize(link.size) + ')' : '')
+ (link.type && !/\.\S+$/.test(name) ? ' [' + link.type + ']' : '')
+ + (link.size != null ? ' (' + this.formatSize(link.size) + ')' : '')
}
Render.prototype.formatSize = function (size) {