lib/nanoc/helpers/text.rb in nanoc-3.7.5 vs lib/nanoc/helpers/text.rb in nanoc-3.8.0
- old
+ new
@@ -16,10 +16,10 @@
# excerpt when the excerpt is shorter than the original string
#
# @return [String] The excerpt of the given string
def excerptize(string, params = {})
# Initialize params
- params[:length] ||= 25
+ params[:length] ||= 25
params[:omission] ||= '...'
# Get excerpt
length = params[:length] - params[:omission].length
length = 0 if length < 0