Commit 893d08c0 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Simplify `contains_emoji_only?` method in `Note`

parent bfe91b69
...@@ -372,8 +372,7 @@ class Note < ActiveRecord::Base ...@@ -372,8 +372,7 @@ class Note < ActiveRecord::Base
end end
def contains_emoji_only? def contains_emoji_only?
emoji_only_pattern = /\A#{Gitlab::Markdown::EmojiFilter.emoji_pattern}\s?\Z/ note =~ /\A#{Gitlab::Markdown::EmojiFilter.emoji_pattern}\s?\Z/
(note =~ emoji_only_pattern) ? true : false
end end
def award_emoji_name def award_emoji_name
......
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