Skip to content

Commit

Permalink
Add .strip in to_paragraphs.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Dec 4, 2016
1 parent 1dc3780 commit 210d378
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/05-string.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def to_line
end

def to_paragraphs(split="\n")
self.split(split).reject { |line| line.ustrip == "" }.map { |line| "<p>#{line}</p>" }.join("\n")
self.split(split).reject { |line| line.ustrip == "" }.map { |line| "<p>#{line.strip}</p>" }.join("\n")
end

def to_filename
Expand Down

0 comments on commit 210d378

Please sign in to comment.