From 8ba3856192368918e1a392075562b0f8dfb659f2 Mon Sep 17 00:00:00 2001 From: openhands Date: Wed, 13 Nov 2024 23:26:10 +0000 Subject: [PATCH 1/3] fix: preserve starting numbers in markdown ordered lists --- frontend/src/components/markdown/list.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/markdown/list.tsx b/frontend/src/components/markdown/list.tsx index 64583f53fd0..11a5c1ac33c 100644 --- a/frontend/src/components/markdown/list.tsx +++ b/frontend/src/components/markdown/list.tsx @@ -13,10 +13,13 @@ export function ul({ // Custom component to render
    in markdown export function ol({ children, + ...props }: React.ClassAttributes & React.HTMLAttributes & ExtraProps) { return ( -
      {children}
    +
      + {children} +
    ); } From c371384e79063cf1808283a0da5a22b0383acaa2 Mon Sep 17 00:00:00 2001 From: openhands Date: Wed, 13 Nov 2024 23:32:16 +0000 Subject: [PATCH 2/3] fix: update ordered list component to use explicit start prop --- frontend/src/components/markdown/list.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/markdown/list.tsx b/frontend/src/components/markdown/list.tsx index 11a5c1ac33c..c953497aa4f 100644 --- a/frontend/src/components/markdown/list.tsx +++ b/frontend/src/components/markdown/list.tsx @@ -13,12 +13,12 @@ export function ul({ // Custom component to render
      in markdown export function ol({ children, - ...props + start, }: React.ClassAttributes & React.HTMLAttributes & ExtraProps) { return ( -
        +
          {children}
        ); From ca5b9abf277d7a44dffef43b36dcffdf23ba6e81 Mon Sep 17 00:00:00 2001 From: openhands Date: Wed, 13 Nov 2024 23:35:44 +0000 Subject: [PATCH 3/3] fix: use correct HTML element types for list components --- frontend/src/components/markdown/list.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/markdown/list.tsx b/frontend/src/components/markdown/list.tsx index c953497aa4f..19b449be171 100644 --- a/frontend/src/components/markdown/list.tsx +++ b/frontend/src/components/markdown/list.tsx @@ -4,8 +4,8 @@ import { ExtraProps } from "react-markdown"; // Custom component to render
          in markdown export function ul({ children, -}: React.ClassAttributes & - React.HTMLAttributes & +}: React.ClassAttributes & + React.HTMLAttributes & ExtraProps) { return
            {children}
          ; } @@ -14,8 +14,8 @@ export function ul({ export function ol({ children, start, -}: React.ClassAttributes & - React.HTMLAttributes & +}: React.ClassAttributes & + React.OlHTMLAttributes & ExtraProps) { return (