No renumbering if content is empty

This commit is contained in:
echarp 2017-06-09 17:37:24 +02:00
parent 324e53297b
commit 69bfd4ffc4

View File

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