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

fix: prevent child changing parent element dir #79

Merged
merged 1 commit into from
May 5, 2024

Conversation

zoli
Copy link
Contributor

@zoli zoli commented Apr 9, 2024

special nodes should change parent element direction if the parent does not contain any preceding text before the special node.
also added tests for this specific bug.

resolves #77

special nodes should change parent element direction if the parent
does not contain any preceding text before the special node.
@zoli
Copy link
Contributor Author

zoli commented Apr 9, 2024

didn't have time to create GitHub workflow to run tests on each pr.

@Hashemian01
Copy link

Any updates on merging this PR @esm7 ? The #77 is getting really annoying.

@esm7
Copy link
Owner

esm7 commented May 2, 2024

Sorry about the holdup, I'll give top priority to do it this Sunday.

@esm7 esm7 merged commit 113ddd1 into esm7:master May 5, 2024
@Hashemian01
Copy link

Thanks for fixing this @zoli! It works great when there's just one kind of formatting, like bold or italics. But if I try to use two at the same time (e.g., bold text inside highlighted paragraph, italic text inside highlighted paragraph, bold text inside italic paragraph, etc) it messes things up again.

این یک تست test است
==این یک تست **test** است==
این یک تست **test** است
*این یک تست **test** است*
==این یک تست *test* است==

image

@Hashemian01
Copy link

(e.g., bold text inside highlighted paragraph, italic text inside highlighted paragraph, bold text inside italic paragraph, etc)

I also need to add that it doesn't matter if there are English characters inside the paragraph or not; when there are two levels of formatting, the direction will be wrong.

==این یک **تست** است==
*این یک **تست** است*
==این یک *تست* است==

image

@esm7
Copy link
Owner

esm7 commented May 5, 2024

There's no point to continue pursuing this issue, as the Obsidian devs are in advanced stages of adding native auto direction RTL to Obsidian 1.6.0.
In the next iterations, this plugin will only improve some edge cases and add some functionality like remembering direction per file and probably some RTL tweaks.
This specific issue won't occur in that version.

@Hashemian01
Copy link

I totally understand. But since obsidian is not open source and the same approach used here might be beneficial to other projects (See), it still makes sense to document the existing issues for future reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Messing up Persian Sentences Containing (Bold - Italic- Strikethrough and coded ) English Phrases
3 participants