diff --git a/src/app/components/generator/McdocRenderer.tsx b/src/app/components/generator/McdocRenderer.tsx index 32117c79..766e0efc 100644 --- a/src/app/components/generator/McdocRenderer.tsx +++ b/src/app/components/generator/McdocRenderer.tsx @@ -33,7 +33,6 @@ export function McdocRoot({ node, makeEdit, ctx } : Props) { return <>
-
@@ -479,7 +478,7 @@ function StructBody({ type: outerType, node, makeEdit, ctx }: StructBodyProps) { return
- +
@@ -528,7 +527,6 @@ function ListBody({ type: outerType, node, makeEdit, ctx }: ListBodyProps) { return
- @@ -578,7 +576,6 @@ function TupleBody({ type, node, makeEdit, ctx }: TupleBodyProps) { return
-
@@ -620,15 +617,10 @@ function ErrorIndicator({ error }: ErrorIndicatorProps) { } interface DocsProps { - hover: string | undefined + desc: string | undefined } -function Docs({ hover }: DocsProps) { - if (hover === undefined) { - return <> - } - const descStart = hover.indexOf('```', hover.indexOf('```') + 3) + 4 - const desc = hover.substring(descStart).trim().replaceAll('`', '') - if (desc.length === 0) { +function Docs({ desc }: DocsProps) { + if (!desc || desc.length === 0) { return <> }