Links are Left-to-Right by default

AI-generated summary

Links are Left-to-Right by default: yaron reported a BiDi issue when adding a link with a Hebrew title in a right-to-left (RTL) direction. The link text was reversed. To bypass this, yaron added ‫ (RLE) at the beginning and ‬ (LRE) at the end of the title. shaib_il noted that using ‬ is correct, as it is the PDF (Pop Directional Format) character. shaib_il also helped to illustrate the issue by reformulating yaron’s example using small letters for LTR text and capitals for RTL text.

Hey,
I’m using Hebrew Discourse.
I tried adding a link with the following title:

ב־GitLab פרטי (In a private GitLab instance)

So I wrote:

ב־GitLab פרטי

And I ended up with:

ב־פרטי GitLab

I managed to bypass this issue by adding ‫ at the beginning of the title and ‬ at the end (These are RLE and LRE in accordance).

I’m not sure why, but it doesn’t happen here with the English interface and the <div dir="rtl"></div> tags.

1 Like

I was going to suggest using PDF rather than LRE to close off the right-to-left bit, but it turns out that &#x202c; actually is PDF…

AFAIK it is custom to present BiDi issues to a mostly-English-reading audience using small letters for the LTR text and capitals for the RTL. So Yaron’s example becomes:

"I wrote

ETAVIRP gitlab A NI
(note Hebrew places adjectives after their nouns -Shai)

"And ended up with

gitlab ETAVIRP A NI

I hope this makes the issue easier to see.

4 Likes