Browse Source

Does not replace links with no number

rails5
echarp 5 years ago
parent
commit
324e53297b
  1. 2
      app/helpers/digest_helper.rb

2
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

Loading…
Cancel
Save