Skip to content
Browse files

auto_link helper fails to recognize links separated by space. [#72 st…

…ate:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
1 parent 3baf810 commit 150717344aa5c6d8f46fc67de39d6947553ac286 Eugene Pimenov committed with lifo May 1, 2008
View
2 actionpack/lib/action_view/helpers/text_helper.rb
@@ -454,7 +454,7 @@ def set_cycle(name, cycle_object)
( # leading text
<\w+.*?>| # leading HTML tag, or
[^=!:'"/]| # leading punctuation, or
- ^ # beginning of line
+ | # nothing
)
(
(?:https?://)| # protocol spec, or
View
1 actionpack/test/template/text_helper_test.rb
@@ -262,6 +262,7 @@ def test_auto_linking
assert_equal email2_result, auto_link(email2_raw)
assert_equal '', auto_link(nil)
assert_equal '', auto_link('')
+ assert_equal "#{link_result} #{link_result} #{link_result}", auto_link("#{link_raw} #{link_raw} #{link_raw}")
end
def test_auto_link_at_eol

0 comments on commit 1507173

Please sign in to comment.
Something went wrong with that request. Please try again.