diff options
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/text_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 91f368fa45..9d8921bf86 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -123,7 +123,7 @@ module ActionView text.gsub!(/(\r\n|\n|\r)/, "\n") # lets make them newlines crossplatform text.gsub!(/\n\n+/, "\n\n") # zap dupes text.gsub!(/\n\n/, '</p>\0<p>') # turn two newlines into paragraph - text.gsub!(/([^\n])(\n)([^\n])/, '\1\2<br />\3') # turn single newline into <br /> + text.gsub!(/([^\n])(\n)(?=[^\n])/, '\1\2<br />') # turn single newline into <br /> content_tag("p", text) end |