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

NOW and LATER are considered Strong character (While DONE isn't) #19

Open
glicksman opened this issue May 6, 2024 · 6 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@glicksman
Copy link

Screenshot 2024-05-07 at 1 09 25

See screenshot for illustration.

  • When using the default labels NOW/LATER, it reverts the block to LTR.
  • When using the label DONE, it stays RTL.

Ideally, the plugin disregards NOW/LATER when it parses them and doesn't count them as the first strong character.

@ahangarha
Copy link
Member

Done is not strong because it doesn't get rendered, so the first strong character of your block becomes your text.

We should find a way to make these keywords neutral.

By the way, what extension do you use to have RTL/LTR in your doc? Is it logseq-bidi?

@glicksman
Copy link
Author

1 -

We should find a way to make these keywords neutral.

Since NOW and LATER are reserved keywords if they appear at the start of the block, can you create a small patch to skip them, when searching for the first Strong Character? Ideally, this will be configurable, so each user can adjust these according to their own workflow.

2 -

By the way, what extension do you use to have RTL/LTR in your doc? Is it logseq-bidi?

Yes, I'm using logseq-bidi version 0.3.0

@ahangarha
Copy link
Member

These keywords are the most annoying thing in Logseq.
While I look for a solution, please let me know if you have any suggestions.

@ahangarha ahangarha added enhancement New feature or request help wanted Extra attention is needed labels May 8, 2024
@glicksman
Copy link
Author

Hi @ahangarha, any thoughts about this?

One suggestion could be to implement a patch that skips the specific words DONE or TODO, when deciding text direction.
This way, if the text immediately after is Arabic/Hebrew, then it goes RTL. Otherwise, it will be LTR.

@ahangarha
Copy link
Member

I can think of such solutions but I am worried that we don't stop it there.

If you can open a PR, I am open to it. I might work on it sometimes in the near future too. But I cannot promise.

@ahangarha
Copy link
Member

I have worked on this issue for a while and has made some "good" progress. There is a few edge cases that I am working on. Because I am going to change some of the internal functionalities, I am worried that the plugin behaves differently in some certain cases.

To ensure we don't have issues with official update, I would need some volunteers to manually replace the official release with the one I provide and check the result. Let me know if you are open for testing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants