style: automatically detect RTL on all MFM content
What does this PR do?
This should allow MFM to always be rendered either RTL or LTR
Closes !462 (closed)
Fixes #356 (closed)
Contribution Guidelines By submitting this merge request, you agree to follow our Contribution Guidelines
-
I agree to follow this project's Contribution Guidelines -
I have made sure to test this pull request
Merge request reports
Activity
assigned to @Marie
after adding
dir=auto
to the postform textarea, things look sensible:@dimkr does it look good enough to you too?
- Resolved by Marie
@dakkar Big improvement over the current state!
The only problem I see in these examples is the bottom example here:
It's rendered correctly (in terms of bidi text direction) but the second part after line breaking is left aligned (visually) instead of right aligned. Maybe this happens because all elements in the page page are left-aligned and beyond the scope of #356 (closed).
I've now pushed my proposed implementation which adds a bunch of
<bdi>
when switching between different "sources" of text:- center
- url
- mention
- hashtag
- code
- quote (in the sense of
> foo
, not quote-renote) - math
As I wrote above, I believe this will not affect LTR text, but should produce more sensible bidi text.
mentioned in issue #356 (closed)
mentioned in commit 928f65be