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 = {