Set markdown-body RTL for Arabic text

This commit is contained in:
Zizwar 2023-06-24 05:53:58 +00:00
parent 946e508e8f
commit 15f8d13d81
2 changed files with 2 additions and 0 deletions

View File

@ -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}

View File

@ -844,6 +844,7 @@
font-size: 85%;
line-height: 1.45;
border-radius: 6px;
direction: ltr;
}
.markdown-body pre code,