aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/text_helper.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-06-24 13:08:54 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-06-24 13:08:54 -0300
commit44c9489a687016c599a2470ee06885c431b7b810 (patch)
treed85b4be2edfde3a56a661c4f4de0fbe5c0dce463 /actionview/lib/action_view/helpers/text_helper.rb
parent6bee389a0c06e557b0278ec013a7f915433260a8 (diff)
parent124f88eaa22ef5b1851db505af9e639c96d5b1d8 (diff)
downloadrails-44c9489a687016c599a2470ee06885c431b7b810.tar.gz
rails-44c9489a687016c599a2470ee06885c431b7b810.tar.bz2
rails-44c9489a687016c599a2470ee06885c431b7b810.zip
Merge pull request #15899 from garethrees/gr-texthelper
Deal with regex match groups in excerpt
Diffstat (limited to 'actionview/lib/action_view/helpers/text_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/text_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/text_helper.rb b/actionview/lib/action_view/helpers/text_helper.rb
index cf5c1b0e81..b859653bc9 100644
--- a/actionview/lib/action_view/helpers/text_helper.rb
+++ b/actionview/lib/action_view/helpers/text_helper.rb
@@ -188,7 +188,7 @@ module ActionView
end
end
- first_part, second_part = text.split(regex, 2)
+ first_part, second_part = text.split(phrase, 2)
prefix, first_part = cut_excerpt_part(:first, first_part, separator, options)
postfix, second_part = cut_excerpt_part(:second, second_part, separator, options)