diff options
Diffstat (limited to 'actiontext/lib/action_text/attachment_gallery.rb')
-rw-r--r-- | actiontext/lib/action_text/attachment_gallery.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actiontext/lib/action_text/attachment_gallery.rb b/actiontext/lib/action_text/attachment_gallery.rb index 45afbff058..48ba9f830c 100644 --- a/actiontext/lib/action_text/attachment_gallery.rb +++ b/actiontext/lib/action_text/attachment_gallery.rb @@ -23,7 +23,7 @@ module ActionText Fragment.wrap(content).find_all(SELECTOR).select do |node| node.children.all? do |child| if child.text? - child.text =~ /\A(\n|\ )*\z/ + /\A(\n|\ )*\z/.match?(child.text) else child.matches? ATTACHMENT_SELECTOR end |