diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 8fb6647d4..64c8c27e4 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -193,8 +193,8 @@ module ApplicationHelper
end
if options[:autolinks]
- message.gsub!(/( |^)(www\.[^ ]+\.[^ ])/, '\1http://\2')
- message.gsub!(/(are
some
new
lines"
end
+
+ it 'should render newlines and basic http links correctly' do
+ message = "Some text, then a line break and a link\nhttp://joindiaspora.com\nsome more text"
+ res = markdownify(message)
+ res.should == 'Some text, then a line break and a link
joindiaspora.com
some more text'
+ end
end
context 'performance' do