forked from XiaoMo/ChatGPT-Next-Web
Set markdown-body RTL for Arabic text
This commit is contained in:
parent
946e508e8f
commit
15f8d13d81
@ -195,6 +195,7 @@ export function Markdown(
|
|||||||
fontSize: `${props.fontSize ?? 14}px`,
|
fontSize: `${props.fontSize ?? 14}px`,
|
||||||
height: getSize(renderedHeight.current),
|
height: getSize(renderedHeight.current),
|
||||||
width: getSize(renderedWidth.current),
|
width: getSize(renderedWidth.current),
|
||||||
|
direction: /[\u0600-\u06FF]/.test(props.content) ? "rtl" : "ltr",
|
||||||
}}
|
}}
|
||||||
ref={mdRef}
|
ref={mdRef}
|
||||||
onContextMenu={props.onContextMenu}
|
onContextMenu={props.onContextMenu}
|
||||||
|
@ -844,6 +844,7 @@
|
|||||||
font-size: 85%;
|
font-size: 85%;
|
||||||
line-height: 1.45;
|
line-height: 1.45;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
direction: ltr;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body pre code,
|
.markdown-body pre code,
|
||||||
|
Loading…
Reference in New Issue
Block a user