Fix crash with img tag in markdown

This commit is contained in:
Kalle
2026-02-17 21:05:01 +02:00
parent 076b122164
commit b9d8fdd95a

View File

@@ -23,7 +23,12 @@ export function Markdown({ children }: { children: string }) {
br: { component: () => <br /> },
hr: { component: () => <hr /> },
img: {
component: (props: React.ComponentProps<"img">) => (
component: ({
children: _,
...props
}: React.ComponentProps<"img"> & {
children?: React.ReactNode;
}) => (
// biome-ignore lint/a11y/useAltText: parsed markdown, so we can't guarantee alt text is present
<img {...props} />
),