Updated cashtags to be any number of characters
• Updated: - cashtags to be any number of characters
This commit is contained in:
parent
be0906b861
commit
b634e4f482
@ -71,8 +71,6 @@ module Extractor
|
||||
end_position = match_data.char_end(1)
|
||||
after = $'
|
||||
|
||||
next if cash_text.size > 5
|
||||
|
||||
if after =~ %r{\A://}
|
||||
cash_text.match(/(.+)(https?\Z)/) do |matched|
|
||||
cash_text = matched[1]
|
||||
|
@ -19,7 +19,7 @@ class Tag < ApplicationRecord
|
||||
|
||||
HASHTAG_NAME_RE = '[[:word:]_]*[[:alpha:]_·][[:word:]_]*'
|
||||
HASHTAG_RE = /(?:^|[^\/\)\w])#(#{HASHTAG_NAME_RE})/i.freeze
|
||||
CASHTAG_RE = /(?:^|[^\/\)\w])\$([a-zA-Z]{2,5})/.freeze
|
||||
CASHTAG_RE = /(?:^|[^\/\)\w])\$([a-zA-Z]{1,})/.freeze
|
||||
|
||||
validates :name, presence: true, uniqueness: true, format: { with: /\A#{HASHTAG_NAME_RE}\z/i }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user