From 8c61e254fd07249b8c420c44d62e8ecd72a78a20 Mon Sep 17 00:00:00 2001 From: Utkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com> Date: Wed, 7 Oct 2026 01:02:09 +0530 Subject: [PATCH] fix(web): stop wide ordered list markers from clipping (#16523) --- apps/web/src/components/ChatMarkdown.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/ChatMarkdown.tsx b/apps/web/src/components/ChatMarkdown.tsx index 3b736cae26536a90726c3e4c931bc30bb7c06bfc..a56db444d2005ded7377295078fe8a70423292e2 100644 --- a/apps/web/src/components/ChatMarkdown.tsx +++ b/apps/web/src/components/ChatMarkdown.tsx @@ -378,7 +378,7 @@ function findTaskListMarkerOffset(markdown: string, listItemStart: number): numb * The default `1.25rem` marker gutter (`.chat-markdown ol`) fits one-character * markers. Wider markers can extend past it and get clipped by a collapsed * message's overflow. Widen the gutter to fit the widest marker, including a - * negative marker's minus sign. + * negative marker's minus sign, the period, and the trailing space. */ function orderedListGutterStyle( itemCount: number, @@ -389,7 +389,7 @@ function orderedListGutterStyle( const lastNumber = firstNumber + Math.max(itemCount - 1, 0); const markerWidth = Math.max(String(firstNumber).length, String(lastNumber).length); if (markerWidth <= 1) return undefined; - return { "--list-gutter": `${markerWidth + 1}ch` }; + return { "--list-gutter": `${markerWidth + 2}ch` }; } type MarkdownImageHastNode = { -- 2.54.0