mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-24 20:16:41 -05:00
Fix crash with img tag in markdown
This commit is contained in:
@@ -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} />
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user