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

RTL Docs Inline Code Snippet need to be always LTR. #8209

Closed
X7md opened this issue May 7, 2024 · 4 comments · Fixed by #8893
Closed

RTL Docs Inline Code Snippet need to be always LTR. #8209

X7md opened this issue May 7, 2024 · 4 comments · Fixed by #8893
Assignees
Labels
bug Something on the site isn't working site improvement Some thing that improves the website functionality - ask @delucis for help!

Comments

@X7md
Copy link
Contributor

X7md commented May 7, 2024

📝 Issue Description

This </ slot>:

image

Should looks like this <slot />:

image

📋 On which page(s) it occurs

https://docs.astro.build/ar/basics/astro-components/

and others...

🤔 Expected Behavior

force inline code to be LTR.

👀 Current Behavior

In Arabic Docs Inline Code Snippet shows as RTL and that break the original code, symbols usually looks reverses which is wrong.

🖥️ Browser

Chrome 124.0.6367.119 (Official Build) (64-bit) (cohort: Stable)

📄 Additional Information

No response

@X7md X7md added the bug Something on the site isn't working label May 7, 2024
@X7md X7md changed the title RTL Docs Inline Code Snippet need to be allows LTR. RTL Docs Inline Code Snippet need to be always LTR. May 7, 2024
@sarah11918 sarah11918 added the site improvement Some thing that improves the website functionality - ask @delucis for help! label Jun 8, 2024
@sarah11918
Copy link
Member

Thanks for reporting this! I will make sure @delucis and @TheOtterlord have this on their radar to look into!

@TheOtterlord
Copy link
Member

Hi @X7md, are you still seeing the issue? I'm unable to replicate this either in Chrome / Firefox. It could be that an update to Starlight fixed this, but I don't see anything specific.

@X7md
Copy link
Contributor Author

X7md commented Jun 16, 2024

Hi @X7md, are you still seeing the issue? I'm unable to replicate this either in Chrome / Firefox. It could be that an update to Starlight fixed this, but I don't see anything specific.

You are right, there is some changes form last time I checked... someone add dir attribute with auto in the inline <code> tags... but still replicate in some context like lists <ul>, <ol>... and as far as I know this because some limitations on the "bi-directional algorithm" on text rendering.

for me I prefer to using something like this:

https://github.com/X7md/x7md.github.io/blob/b649d3585d345e6f2835344a9b13fdc2b6553575/src/layouts/Layout.astro#L107-L116

IMG_2159

IMG_2160

@delucis
Copy link
Member

delucis commented Jun 28, 2024

Thanks for sharing @X7md! I think the list formatting issue you screenshotted there is actually a problem with the source file, which includes the . in the wrong place unless I’m mistaken?

- [`astro.`](#صفحات-استرو)
- [`md.`](#صفحات-ماركداونmdx)
- `mdx.` (مع [MDX التكامل المثبت](/ar/guides/integrations-guide/mdx/#installation))
- [`html.`](#صفحات-html)
- `js` / `.ts.`[النهايات](/ar/guides/endpoints/))

Just tried with .astro in the content instead of astro. and then the dir="auto" still works correctly. Would you be up for PR’ing a fix to that file? Or are there other places this is happening?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something on the site isn't working site improvement Some thing that improves the website functionality - ask @delucis for help!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants