mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: stop stripping zero-width-whitespace
This char is used for formatting khmer words
This commit is contained in:
@@ -44,7 +44,7 @@ class TextCleaner
|
||||
text
|
||||
end
|
||||
|
||||
@@whitespaces_regexp = Regexp.new("(\u00A0|\u1680|\u180E|[\u2000-\u200B]|\u2028|\u2029|\u202F|\u205F|\u3000|\uFEFF)", "u").freeze
|
||||
@@whitespaces_regexp = Regexp.new("(\u00A0|\u1680|\u180E|[\u2000-\u200A]|\u2028|\u2029|\u202F|\u205F|\u3000)", "u").freeze
|
||||
|
||||
def self.normalize_whitespaces(text)
|
||||
text.gsub(@@whitespaces_regexp, ' ')
|
||||
|
||||
Reference in New Issue
Block a user