From ab94017e3a5c2c2f7582cf1f716387824861e09c Mon Sep 17 00:00:00 2001 From: Elkana Bardugo Date: Mon, 17 Feb 2025 21:27:05 +0200 Subject: [PATCH] Auto text direction (fix for RTL) in most cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../chat/Messages/Markdown/MarkdownTokens.svelte | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/components/chat/Messages/Markdown/MarkdownTokens.svelte b/src/lib/components/chat/Messages/Markdown/MarkdownTokens.svelte index 8a3d22f73..32a4b9e87 100644 --- a/src/lib/components/chat/Messages/Markdown/MarkdownTokens.svelte +++ b/src/lib/components/chat/Messages/Markdown/MarkdownTokens.svelte @@ -169,14 +169,14 @@ {:else if token.type === 'blockquote'} -
+
{:else if token.type === 'list'} {#if token.ordered}
    {#each token.items as item, itemIdx} -
  1. +
  2. {#if item?.task} {#each token.items as item, itemIdx} -
  3. +
  4. {#if item?.task} {:else if token.type === 'paragraph'} -

    +

    {:else if token.type === 'text'} {#if top} -

    +

    {#if token.tokens} {:else}