diff options
Diffstat (limited to 'actiontext/lib')
-rw-r--r-- | actiontext/lib/action_text/attachables/remote_image.rb | 2 | ||||
-rw-r--r-- | actiontext/lib/action_text/attachment_gallery.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/actiontext/lib/action_text/attachables/remote_image.rb b/actiontext/lib/action_text/attachables/remote_image.rb index 650b11862b..c5819ef1f5 100644 --- a/actiontext/lib/action_text/attachables/remote_image.rb +++ b/actiontext/lib/action_text/attachables/remote_image.rb @@ -14,7 +14,7 @@ module ActionText private def content_type_is_image?(content_type) - content_type.to_s =~ /^image(\/.+|$)/ + content_type.to_s.match?(/^image(\/.+|$)/) end def attributes_from_node(node) 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 |