从最新的 remark-gfm 文档中,我可以看到它应该支持脚注。但是,当我键入以下内容时:
Text here. [^1]
Text here. [^2]
[^1]: note 1
[^2]: note 2
这显示为文本,而不是转换为 HTML 标记。
我的代码是:
...
import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";
...
<ReactMarkdown children={markdown_content_here} remarkPlugins={[remarkGfm]} />
...