lib/card/content/truncate.rb in card-1.93.0 vs lib/card/content/truncate.rb in card-1.93.1
- old
+ new
@@ -1,17 +1,17 @@
class Card
class Content
# tools for truncating content
module Truncate
- ELLISPES_HTML = '<span class="closed-content-ellipses">...</span>'.freeze
+ ELLIPSES_HTML = '<span class="closed-content-ellipses">...</span>'.freeze
def smart_truncate input, words=25
return if input.nil?
truncated, wordstring = truncate input, words
# nuke partial tags at end of snippet
wordstring.gsub!(/(<[^\>]+)$/, "")
wordstring = close_tags wordstring
- wordstring += ELLISPES_HTML if truncated
+ wordstring += ELLIPSES_HTML if truncated
# wordstring += '...' if wordlist.length > l
polish wordstring
end
def truncate input, words