You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm facing a problem with telephone numbers in bidirectional texts.
My approach is in a rtl-text, to use a span around the phone number, use direction : ltr and unicode-bidi: embed on it. this works fine if there is no plus at the beginning for an international number. But most of the times there is a plus. So what I tried to do is, to use an or at the end of the number. And now it is ordered correct. But you can see the problem in this screenshot. Where i put those marks, there is an extra char or sign or however you call it. that little arrow in front of the numbers. Do you now how to prevent this or is it a bug?
It turns out you have found a couple of bugs. As well as the lrm character being output, the direction: ltr in CSS is not being honored.
As a quick workaround, you can use the dir attribute rather than specifying ltr in CSS: <span dir="ltr">+123 456 etc</span>. I think this is recommended approach anyway.
As for the bug, it stems from this line in ParagraphSplitter class:
if (style.isParagraphContainerForBidi() || element.hasAttribute("dir") || element.getNodeName().equals("bdi")) {
// If a element has a dir attribute or is a bdi tag it sits in its own direction isolate.
It should also consider an explicit change of direction via CSS as a direction isolate. I'll try to work a fix now.
P.S. We also don't support the unicode-bidi property but if you need it you can use a bdi tag instead.
I'm facing a problem with telephone numbers in bidirectional texts.
My approach is in a rtl-text, to use a span around the phone number, use direction : ltr and unicode-bidi: embed on it. this works fine if there is no plus at the beginning for an international number. But most of the times there is a plus. So what I tried to do is, to use an or at the end of the number. And now it is ordered correct. But you can see the problem in this screenshot. Where i put those marks, there is an extra char or sign or however you call it. that little arrow in front of the numbers. Do you now how to prevent this or is it a bug?
The html at that point is
<span style="font-family: 'Sakkal Majalla' !important; ">الرقم</span>
<span> <span style="font-family: 'Liberation Sans' !important; direction: ltr; unicode-bidi: embed;">
‎+49 ‎1 ‎1234 ‎5678 ‎</span> </span>
<span style="font-family: 'Sakkal Majalla' !important; ">أو</span>"
The text was updated successfully, but these errors were encountered: