From 04ddfa4303f4622f80128dad2dc84a7a30e73f67 Mon Sep 17 00:00:00 2001 From: cel Date: Sun, 28 Oct 2018 13:47:02 -1000 Subject: img alt: type before size --- lib/render.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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) { -- cgit v1.2.3