fix RTL reverse

This commit is contained in:
Pete Matsyburka
2024-01-10 10:13:33 +02:00
parent 8b80679b3a
commit 298c64a119
5 changed files with 34 additions and 3 deletions
+3 -1
View File
@@ -300,7 +300,9 @@ module Submissions
def maybe_rtl_reverse(text)
if text.match?(RTL_REGEXP)
ArabicLetterConnector.transform(text).reverse
TwitterCldr::Shared::Bidi
.from_string(ArabicLetterConnector.transform(text), direction: :RTL)
.reorder_visually!.to_s
else
text
end