Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code tags produced by markdown in user content do not follow direction of surrounding text #3762

Closed
bgo-eiu opened this issue Oct 21, 2022 · 1 comment
Labels
diaries Related to the User Diaries feature

Comments

@bgo-eiu
Copy link

bgo-eiu commented Oct 21, 2022

How to reproduce the issue?

This issue falls under the umbrella of #3427. This is related but different from the issue discussed in #3428 and for which a draft is posted at #3429.

When a user includes Markdown formatted to become <code></code> in a diary entry, this text is impacted by direction override styling which means that even with dir="auto" added to the overall diary content, the text will render only in the direction of the interface language, causing RTL characters to appear LTR in LTR interfaces and LTR characters to appear RTL in RTL interfaces. I think this might be coming from somewhere in Bootstrap, but I am not sure. In the CSS, this is the rule that needs to be removed from somewhere:

pre, code, kbd, samp {
    direction: rtl /* presumably ltr in ltr layouts */
    unicode-bidi: bidi-override; /* this causes dir=auto to be ignored
}

See for example in this recent diary entry:
https://www.openstreetmap.org/user/b-unicycling/diary/400151

Screenshot(s) or anything else?

In the console here, I have applied corrections to the text alignment and direction of the overall diary entry, and the issue with code text is apparent:

image

This is after unchecking unicode-bidi in the console style panel:

image

@lectrician1 lectrician1 added the diaries Related to the User Diaries feature label Nov 13, 2022
@AntonKhorev
Copy link
Collaborator

#4104 was a duplicate of this, now fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diaries Related to the User Diaries feature
Projects
None yet
Development

No branches or pull requests

4 participants