diff --git a/src/components/ui/markdown/Markdown.tsx b/src/components/ui/markdown/Markdown.tsx index 8e8af03278..b6f82cb768 100644 --- a/src/components/ui/markdown/Markdown.tsx +++ b/src/components/ui/markdown/Markdown.tsx @@ -1,12 +1,12 @@ 'use client' -/* eslint-disable react-hooks/rules-of-hooks */ -import type React from 'react' import { Fragment, memo, Suspense, useMemo, useRef } from 'react' import { clsx } from 'clsx' import { compiler, sanitizeUrl } from 'markdown-to-jsx' import Script from 'next/script' import type { MarkdownToJSX } from 'markdown-to-jsx' +/* eslint-disable react-hooks/rules-of-hooks */ +import type React from 'react' import type { FC, PropsWithChildren } from 'react' import { CodeBlockRender } from '~/components/modules/shared/CodeBlock' @@ -139,6 +139,7 @@ export const Markdown: FC = key={state?.key} checked={node.completed} readOnly + className="!size-[1em]" /> ) }, diff --git a/src/components/ui/markdown/renderers/footnotes.tsx b/src/components/ui/markdown/renderers/footnotes.tsx index 930bdd98f4..e36d44b775 100644 --- a/src/components/ui/markdown/renderers/footnotes.tsx +++ b/src/components/ui/markdown/renderers/footnotes.tsx @@ -10,14 +10,14 @@ import { redHighlight } from '../utils/redHighlight' export const MFootNote: FC = (props) => { return ( -
+
- {React.Children.map(props.children, (child) => { - if (React.isValidElement(child)) { - const id = child.props.id - return ( -
-
+
    + {React.Children.map(props.children, (child) => { + if (React.isValidElement(child)) { + const id = child.props.id + return ( +
  • {React.cloneElement(child as React.ReactElement, { className: 'inline', })} @@ -39,13 +39,13 @@ export const MFootNote: FC = (props) => { {id} -
-
- ) - } else { - return null // 或者其他处理方式 - } - })} + + ) + } else { + return null // 或者其他处理方式 + } + })} +
) }