lib/truncateHTML.rb in truncateHTML-0.0.1 vs lib/truncateHTML.rb in truncateHTML-1.0.0

- old
+ new

@@ -21,11 +21,11 @@ require "hpricot" require "truncateHTML/hpricot_truncator" module TruncateHTML - # Like the Rails _truncate_ helper but doesn't break HTML tags, entities, and optionally. words. + # Like the Rails _truncate_ helper but doesn't break HTML tags, entities, and optionally words. def self.truncate(text, options={}) return if text.nil? max_length = options[:max_length] || 40 ellipsis = options[:ellipsis] || "..." @@ -55,6 +55,6 @@ return_status = false end return status ? [return_string, return_status] : return_string end -end \ No newline at end of file +end