Skip to content

Commit

Permalink
Added Thai diacritics and tone marks in HASHTAG_INVALID_CHARS_RE (mas…
Browse files Browse the repository at this point in the history
  • Loading branch information
ppnplus authored Nov 14, 2023
1 parent 7e1a77e commit 2b038b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Tag < ApplicationRecord

HASHTAG_RE = %r{(?<![=/)\w])#(#{HASHTAG_NAME_PAT})}i
HASHTAG_NAME_RE = /\A(#{HASHTAG_NAME_PAT})\z/i
HASHTAG_INVALID_CHARS_RE = /[^[:alnum:]#{HASHTAG_SEPARATORS}]/
HASHTAG_INVALID_CHARS_RE = /[^[:alnum:]\u0E47-\u0E4E#{HASHTAG_SEPARATORS}]/

validates :name, presence: true, format: { with: HASHTAG_NAME_RE }
validates :display_name, format: { with: HASHTAG_NAME_RE }
Expand Down

0 comments on commit 2b038b4

Please sign in to comment.