Commit 457edc7d authored by Harish Ramachandran's avatar Harish Ramachandran Committed by Jan Provaznik

Replace one more match method with an equality

parent e3fa2b73
...@@ -55,7 +55,7 @@ module MarkupHelper ...@@ -55,7 +55,7 @@ module MarkupHelper
# either pure text or emojis, wrapping anything found in the # either pure text or emojis, wrapping anything found in the
# requested link # requested link
fragment.children.each do |node| fragment.children.each do |node|
next unless node.text? || node.name.match?('gl-emoji') next unless node.text? || node.name == 'gl-emoji'
node.replace(link_to(node.text, url, html_options)) if node.text? node.replace(link_to(node.text, url, html_options)) if node.text?
node.replace(link_to(node.to_html.html_safe, url, html_options)) if node.name == 'gl-emoji' node.replace(link_to(node.to_html.html_safe, url, html_options)) if node.name == 'gl-emoji'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment