diff --git a/apps/web/src/components/ChatMarkdown.tsx b/apps/web/src/components/ChatMarkdown.tsx index da44045c98aa1adb4de2baee025ec8fa4967363b..f4298fc22208ac664a1b0c7b9ec6699aa0cf2e59 100644 --- a/apps/web/src/components/ChatMarkdown.tsx +++ b/apps/web/src/components/ChatMarkdown.tsx @@ -66,7 +66,9 @@ const highlighterPromiseCache = new Map>(); function extractFenceLanguage(className: string | undefined): string { const match = className?.match(CODE_FENCE_LANGUAGE_REGEX); - return match?.[1] ?? "text"; + const raw = match?.[1] ?? "text"; + // Shiki doesn't bundle a gitignore grammar; ini is a close match (#685) + return raw === "gitignore" ? "ini" : raw; } function nodeToPlainText(node: ReactNode): string {