<p></p>
<h3 dir="auto">URL</h3>
<p dir="auto"><a href="https://www.openstreetmap.org/user/b-unicycling/diary/400151" rel="nofollow">https://www.openstreetmap.org/user/b-unicycling/diary/400151</a></p>
<h3 dir="auto">How to reproduce the issue?</h3>
<p dir="auto">This issue falls under the umbrella of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1108341337" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/3427" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/3427/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/3427">#3427</a>. This is related but different from the issue discussed in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1108345241" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/3428" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/3428/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/3428">#3428</a> and for which a draft is posted at <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1108455871" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/3429" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/3429/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/3429">#3429</a>.</p>
<p dir="auto">When a user includes Markdown formatted to become <code class="notranslate"><code></code></code> in a diary entry, this text is impacted by direction override styling which means that even with <code class="notranslate">dir="auto"</code> 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:</p>
<pre class="notranslate"><code class="notranslate">pre, code, kbd, samp {
direction: rtl /* presumably ltr in ltr layouts */
unicode-bidi: bidi-override; /* this causes dir=auto to be ignored
}
</code></pre>
<p dir="auto">See for example in this recent diary entry:<br>
<a href="https://www.openstreetmap.org/user/b-unicycling/diary/400151" rel="nofollow">https://www.openstreetmap.org/user/b-unicycling/diary/400151</a></p>
<h3 dir="auto">Screenshot(s) or anything else?</h3>
<p dir="auto">In the console here, I have applied corrections to the text alignment and direction of the overall diary entry, and the issue with <code class="notranslate">code</code> text is apparent:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/100172442/197285762-da2a9e08-fbbe-4f8a-ae79-d8a71f6fe034.png"><img src="https://user-images.githubusercontent.com/100172442/197285762-da2a9e08-fbbe-4f8a-ae79-d8a71f6fe034.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">This is after unchecking <code class="notranslate">unicode-bidi</code> in the console style panel:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/100172442/197285852-46c8fa74-4d1a-43a7-b784-12a4be241d7e.png"><img src="https://user-images.githubusercontent.com/100172442/197285852-46c8fa74-4d1a-43a7-b784-12a4be241d7e.png" alt="image" style="max-width: 100%;"></a></p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/3762">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNDEA672XOKOALIEJ3WEL6LLANCNFSM6AAAAAARLP54RI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLKIY5USIZO3JXJ2PLWEL6LLA5CNFSM6AAAAAARLP54RKWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHFJEOYBQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/3762</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/3762",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/3762",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>