lib/card/content.rb in card-1.15.4 vs lib/card/content.rb in card-1.15.5
- old
+ new
@@ -177,9 +177,15 @@
" "
end
end.gsub(/<\!--.*?-->/, '')
end
+ if Card.config.space_last_in_multispace
+ def clean_with_space_last! string, tags = ALLOWED_TAGS
+ clean_without_space_last!(string, tags).gsub(/(?:^|\b) ((?: )+)/, '\1 ')
+ end
+ alias_method_chain :clean!, :space_last
+ end
def truncatewords_with_closing_tags(input, words = 25, truncate_string = "...")
if input.nil? then return end
wordlist = input.to_s.split
l = words.to_i - 1
l = 0 if l < 0