From 324e53297be27c31ccf52445a8d08aeb6ddf6fc6 Mon Sep 17 00:00:00 2001 From: echarp <manu@echarp.org> Date: Tue, 6 Jun 2017 23:29:45 +0200 Subject: [PATCH] Does not replace links with no number --- app/helpers/digest_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/digest_helper.rb b/app/helpers/digest_helper.rb index 2474d2665..da3696cac 100644 --- a/app/helpers/digest_helper.rb +++ b/app/helpers/digest_helper.rb @@ -3,6 +3,6 @@ module DigestHelper # Important mechanism, to ensure the digest will not have the same footnote # link multiple times def renumber_footnotes(id, description) - description.gsub(/\[(\d)*\]/, "[#{id}_\\1]") + description.gsub(/\[(\d)+\]/, "[#{id}_\\1]") end end -- GitLab