FIX: Use correct Regexp flag to ignore case (#19184)
Ruby 3.2 started enforcing valid string flags in Regexp constructor.
This commit is contained in:
parent
84c1cc70d6
commit
90411540c7
|
@ -71,7 +71,7 @@ class TextCleaner
|
|||
text
|
||||
end
|
||||
|
||||
@@whitespaces_regexp = Regexp.new("(\u00A0|\u1680|\u180E|[\u2000-\u200A]|\u2028|\u2029|\u202F|\u205F|\u3000)", "u").freeze
|
||||
@@whitespaces_regexp = Regexp.new("(\u00A0|\u1680|\u180E|[\u2000-\u200A]|\u2028|\u2029|\u202F|\u205F|\u3000)", Regexp::IGNORECASE).freeze
|
||||
|
||||
def self.normalize_whitespaces(text)
|
||||
text&.gsub(@@whitespaces_regexp, ' ')
|
||||
|
|
Loading…
Reference in New Issue