diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-10-28 13:47:02 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-10-28 13:47:02 -1000 |
commit | 04ddfa4303f4622f80128dad2dc84a7a30e73f67 (patch) | |
tree | 2038e1ac31b20fe07a20ce3a1eb1a3089f1c2d86 /lib | |
parent | 2b8560d33db86408a74483d016975591a46765ea (diff) | |
download | patchfoo-04ddfa4303f4622f80128dad2dc84a7a30e73f67.tar.gz patchfoo-04ddfa4303f4622f80128dad2dc84a7a30e73f67.zip |
img alt: type before size
Diffstat (limited to 'lib')
-rw-r--r-- | lib/render.js | 2 |
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) { |