chore: automatically detect RTL on all MFM content

This commit is contained in:
Marie 2024-03-29 16:52:22 +00:00
parent 58bc8f2c10
commit 6bc258a3e0

View file

@ -473,6 +473,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
}).flat(Infinity) as (VNode | string)[]; }).flat(Infinity) as (VNode | string)[];
return h('span', { return h('span', {
dir: 'auto',
// https://codeday.me/jp/qa/20190424/690106.html // https://codeday.me/jp/qa/20190424/690106.html
style: props.nowrap ? 'white-space: pre; word-wrap: normal; overflow: hidden; text-overflow: ellipsis;' : 'white-space: pre-wrap;', style: props.nowrap ? 'white-space: pre; word-wrap: normal; overflow: hidden; text-overflow: ellipsis;' : 'white-space: pre-wrap;',
}, genEl(rootAst, props.rootScale ?? 1)); }, genEl(rootAst, props.rootScale ?? 1));