mirror of
https://github.com/open-webui/open-webui
synced 2025-02-22 21:32:32 +00:00
Auto text direction (fix for RTL) in most cases
to test it use the prompt: "write please a sample headers (level 1,2,3), text (bold/italic), list, numbered list, quetes, table, code write each example in hebrew dont output markdown in code block" need to be fixed: * Redundant border properties in quotes: Removed border-left as border-inline-start properly handles both LTR/RTL and by this prevents double borders in RTL layouts * table header have `text-align: left` instead of start e.g. text-align and direction is not the save thing the text direction is ok. the `dir="auto"` is fixing the direction שמג the text-align by default is set by the direction, if it set manually is should be start/end to respect the direction attribute
This commit is contained in:
parent
2017856791
commit
ab94017e3a
@ -169,14 +169,14 @@
|
||||
</div>
|
||||
</div>
|
||||
{:else if token.type === 'blockquote'}
|
||||
<blockquote>
|
||||
<blockquote dir="auto">
|
||||
<svelte:self id={`${id}-${tokenIdx}`} tokens={token.tokens} {onTaskClick} {onSourceClick} />
|
||||
</blockquote>
|
||||
{:else if token.type === 'list'}
|
||||
{#if token.ordered}
|
||||
<ol start={token.start || 1}>
|
||||
{#each token.items as item, itemIdx}
|
||||
<li>
|
||||
<li dir="auto">
|
||||
{#if item?.task}
|
||||
<input
|
||||
class=" translate-y-[1px] -translate-x-1"
|
||||
@ -208,7 +208,7 @@
|
||||
{:else}
|
||||
<ul>
|
||||
{#each token.items as item, itemIdx}
|
||||
<li>
|
||||
<li dir="auto">
|
||||
{#if item?.task}
|
||||
<input
|
||||
class=" translate-y-[1px] -translate-x-1"
|
||||
@ -268,7 +268,7 @@
|
||||
onload="this.style.height=(this.contentWindow.document.body.scrollHeight+20)+'px';"
|
||||
></iframe>
|
||||
{:else if token.type === 'paragraph'}
|
||||
<p>
|
||||
<p dir="auto">
|
||||
<MarkdownInlineTokens
|
||||
id={`${id}-${tokenIdx}-p`}
|
||||
tokens={token.tokens ?? []}
|
||||
@ -277,7 +277,7 @@
|
||||
</p>
|
||||
{:else if token.type === 'text'}
|
||||
{#if top}
|
||||
<p>
|
||||
<p dir="auto">
|
||||
{#if token.tokens}
|
||||
<MarkdownInlineTokens id={`${id}-${tokenIdx}-t`} tokens={token.tokens} {onSourceClick} />
|
||||
{:else}
|
||||
|
Loading…
Reference in New Issue
Block a user