From f1c6822dc940d01102747bc7a6d405a0a964b60a Mon Sep 17 00:00:00 2001 From: Toto Tvalavadze Date: Thu, 31 Jul 2014 23:33:59 +0400 Subject: [PATCH 1/2] =?UTF-8?q?replaced=20=E2=86=A9=20to=20safer=20↩?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/marked.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/marked.js b/lib/marked.js index 6f2e39e420..6c4d1ecc6e 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -906,7 +906,7 @@ Renderer.prototype.footnote = function(ref, body) { return '
  • ' + body + '' + + ' in the text.">↩' + '
  • \n'; }; From 1af385654d396af1e23a59c1934eb3ccd72245e5 Mon Sep 17 00:00:00 2001 From: Toto Tvalavadze Date: Fri, 1 Aug 2014 00:30:18 +0400 Subject: [PATCH 2/2] fixed footnote ref with "uniquefiers" many blogs include dates or random string after reference number for footnotes, this commit renders such correctly, preserving unique references for link hrefs. --- lib/marked.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/marked.js b/lib/marked.js index 6c4d1ecc6e..c6191f3423 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -898,14 +898,14 @@ Renderer.prototype.del = function(text) { Renderer.prototype.footnoteref = function(ref) { return '' - + '' + ref + '' + + '' + ref.split("-")[0] + '' + ''; }; Renderer.prototype.footnote = function(ref, body) { return '
  • ' + body + '' + '
  • \n'; };