Repository navigation
Conversation
Serializes direction as standard HTML <div dir="..."> wrappers so .md files remain portable across other renderers. - muya: new DirectionBlock container; markdownToState pre-processes direction wrappers before the marked lexer (handles blank lines inside code blocks); stateToMarkdown wraps the full document or individual blocks; IDirectionBlockState added to the type union - desktop: mt::editor-direction-action IPC channel; Document Direction and Block Direction submenus in the Paragraph menu (RTL/LTR/Follow checkboxes); applyDocumentDir applies the dir attribute to the DOM on load, tab switch, and source→WYSIWYG handoff; listenForMain.ts forwards the IPC to the bus; locale keys added for all 10 language files - fixes: empty json-change op (was null, crashing History._record); block direction detection when cursor is inside an existing DirectionBlock (getBlockDirection, setBlockDirection, unwrapDirectionBlock); IPC forwarding that was silently dropping direction menu actions Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Member
|
I found all your test plan unchecked? |
Author
I didn't know I have to check them here, I have tested it and it works. I'm using my own branch at the time and I've had no problems so far. |
Author
|
I've merged the latest develop branch into my pr, and tested that it still works, so it can be merged. I'd appreciate of someone review it. |
Member
|
Please fix the conficts and open a feature issue first. |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<div dir="...">wrappers so.mdfiles remain portable across other renderers.DirectionBlockcontainer to the muya engine;markdownToStatepre-processes direction wrappers before the marked lexer (handles blank lines inside code blocks);stateToMarkdownwraps the full document or individual blocks.mt::editor-direction-actionIPC channel;applyDocumentDirapplies thedirattribute to the DOM on load, tab switch, and source→WYSIWYG handoff.Motivation
MarkText had no way to write RTL text (Arabic, Hebrew, Persian, etc.) correctly. Users had to rely on OS-level workarounds with no per-document control.
Test plan
<div dir="rtl">...</div>)..mdin another renderer (e.g. GitHub preview):<div dir>wrapper visible and correct.pnpm run lintpasses.pnpm run typecheckpasses.Related
Closes #1919 and probably Closes #3569 by allowing the user to set the document direction.
This Closes #5244 feature issue that was created for thi PR.
🤖 Generated with Claude Code