Files
multica/packages/ui/markdown/markdown.css
AbdulrhmanKassemSallaandClaude Opus 5.5 d3730f29f9 fix(editor): render mixed RTL/LTR text with per-block direction (#9261)
Arabic/Hebrew/Persian comments and descriptions that mix in English
words, paths or numbers render left-aligned with scrambled word order,
because every block inherits the page's LTR direction.

Use `unicode-bidi: plaintext` so each paragraph, list item, heading and
blockquote resolves its base direction from its own first strong
character, and `text-align: start` so alignment follows it. Applied to
.rich-text-editor (prose.css) and .markdown-content (markdown.css).
LTR-only content resolves to LTR and is unchanged.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-15 16:05:24 +08:00

17 lines
380 B
CSS

.markdown-content .katex-display {
margin: 0.75rem 0;
overflow-x: auto;
overflow-y: hidden;
}
.markdown-content .katex-display > .katex {
white-space: nowrap;
}
/* Mixed RTL/LTR text: resolve each block's direction from its own content
(same rule as .rich-text-editor in prose.css). */
.markdown-content :is(p, li) {
unicode-bidi: plaintext;
text-align: start;
}