From ab16388714bf3eb186df1473aaea91e6a9e2dce1 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sun, 26 Jan 2020 01:04:51 -0600 Subject: restore monsterfork hashtag parsing behavior --- app/models/tag.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models') diff --git a/app/models/tag.rb b/app/models/tag.rb index a1265b2a5..cec030ff3 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -21,7 +21,7 @@ class Tag < ApplicationRecord has_one :account_tag_stat, dependent: :destroy - HASHTAG_NAME_RE = '([[:word:]_][[:word:]_·]*[[:alpha:]_·][[:word:]_·]*[[:word:]_])|([[:word:]_]*[[:alpha:]][[:word:]_]*)' + HASHTAG_NAME_RE = '[[:word:]:._\-]*[[:alpha:]:._·\-][[:word:]:._\-]*' HASHTAG_RE = /(?:^|[^\/\)\w])#(#{HASHTAG_NAME_RE})/i validates :name, presence: true, uniqueness: true, format: { with: /\A(#{HASHTAG_NAME_RE})\z/i } -- cgit