diff options
author | francis <francis> | 2009-04-23 13:41:43 +0000 |
---|---|---|
committer | francis <francis> | 2009-04-23 13:41:43 +0000 |
commit | 44dd21146a9220daf479bcf2f064c12cdcd85706 (patch) | |
tree | d997178afbf9aa8857b1770a516c0827d0053e0a /spec/libs/format_spec.rb | |
parent | b279c1b38d4a5d464a4d7c2939104bf57857fbd8 (diff) |
Don't be greedy, or will eat to many newlines that span to next URL.
Diffstat (limited to 'spec/libs/format_spec.rb')
-rw-r--r-- | spec/libs/format_spec.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/libs/format_spec.rb b/spec/libs/format_spec.rb index df25a78c2..a97e7cd9e 100644 --- a/spec/libs/format_spec.rb +++ b/spec/libs/format_spec.rb @@ -12,12 +12,14 @@ describe "when making clickable" do it "should make wrapped URLs in angle brackets clickable" do text = """<http://www.flou rish.org/bl -og>""" +og> + +More stuff and then another angle bracket >""" text = CGI.escapeHTML(text) formatted = MySociety::Format.make_clickable(text) - formatted.should == "<<a href='http://www.flourish.org/blog'>http://www.flourish.org/blog</a>>" + formatted.should == "<<a href='http://www.flourish.org/blog'>http://www.flourish.org/blog</a>>\n\nMore stuff and then another angle bracket >" end end |