diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-04-06 16:34:55 -0700 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-04-06 16:34:55 -0700 |
commit | 1f165c468822356b7379f04ae20447dcaf79d918 (patch) | |
tree | fba009de61a6941e71aa492394e7bcb4877a3fae | |
parent | 22c9b2a241735a70f76473b4bb37fe530219e31c (diff) | |
download | patchfoo-1f165c468822356b7379f04ae20447dcaf79d918.tar.gz patchfoo-1f165c468822356b7379f04ae20447dcaf79d918.zip |
Use download property instead of link name field
-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 9c37d9c..3a39ccb 100644 --- a/lib/render.js +++ b/lib/render.js @@ -37,12 +37,12 @@ MdRenderer.prototype.image = function (href, title, text) { MdRenderer.prototype.link = function(href, title, text) { href = this.urltransform(href) var name = href && /^\/(&|%26)/.test(href) && (title || text) - if (name) href += '?name=' + encodeURIComponent(name) return '<a' + (href !== false ? ' href="' + href + '"' : ' class="bad"') + (title ? ' title="' + title + '"' : '') + + (name ? ' download="' + encodeURIComponent(name) + '"' : '') + '>' + text + '</a>' }; |