Does not replace links with no number

This commit is contained in:
echarp 2017-06-06 23:29:45 +02:00
parent 988da88983
commit 324e53297b

View File

@ -3,6 +3,6 @@ module DigestHelper
# Important mechanism, to ensure the digest will not have the same footnote # Important mechanism, to ensure the digest will not have the same footnote
# link multiple times # link multiple times
def renumber_footnotes(id, description) def renumber_footnotes(id, description)
description.gsub(/\[(\d)*\]/, "[#{id}_\\1]") description.gsub(/\[(\d)+\]/, "[#{id}_\\1]")
end end
end end