mirror of https://github.com/docusealco/docuseal
parent
98f5bba832
commit
f1ebd8f912
@ -1,4 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
Rails.application.config.filter_parameters += %i[password token otp_attempt passw secret token _key crypt salt
|
||||
certificate otp ssn]
|
||||
certificate otp ssn file]
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module TextUtils
|
||||
RTL_REGEXP = /[\p{Hebrew}\p{Arabic}]/
|
||||
|
||||
module_function
|
||||
|
||||
def maybe_rtl_reverse(text)
|
||||
if text.match?(RTL_REGEXP)
|
||||
TwitterCldr::Shared::Bidi
|
||||
.from_string(ArabicLetterConnector.transform(text), direction: :RTL)
|
||||
.reorder_visually!.to_s
|
||||
else
|
||||
text
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in new issue