diff --git a/app/components/markdown.tsx b/app/components/markdown.tsx index fbde6453..4db5f573 100644 --- a/app/components/markdown.tsx +++ b/app/components/markdown.tsx @@ -195,6 +195,7 @@ export function Markdown( fontSize: `${props.fontSize ?? 14}px`, height: getSize(renderedHeight.current), width: getSize(renderedWidth.current), + direction: /[\u0600-\u06FF]/.test(props.content) ? "rtl" : "ltr", }} ref={mdRef} onContextMenu={props.onContextMenu} diff --git a/app/styles/markdown.scss b/app/styles/markdown.scss index 31d10c4c..672167d4 100644 --- a/app/styles/markdown.scss +++ b/app/styles/markdown.scss @@ -844,6 +844,7 @@ font-size: 85%; line-height: 1.45; border-radius: 6px; + direction: ltr; } .markdown-body pre code,