summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-11-19 00:03:45 +0200
committerValery Sizov <vsv2711@gmail.com>2015-11-19 01:26:00 +0200
commitdb91ef3a2a46511da23dff780791a70594e57312 (patch)
tree453c728d61b5fc1ce303ffac4e437194210a5701 /app
parent23df515fd09661a690c0c0a651e131bc3a6d0191 (diff)
downloadgitlab-ce-db91ef3a2a46511da23dff780791a70594e57312.tar.gz
better regexp
Diffstat (limited to 'app')
-rw-r--r--app/services/notes/create_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/notes/create_service.rb b/app/services/notes/create_service.rb
index f448f61cc86..dbff58dfb9c 100644
--- a/app/services/notes/create_service.rb
+++ b/app/services/notes/create_service.rb
@@ -35,7 +35,7 @@ module Notes
end
def contains_emoji_only?(note)
- note =~ /^:[-_+[:alnum:]]*:\s?/
+ note =~ /\A:[-_+[:alnum:]]*:\s?\z/
end
def emoji_name(note)