Unverified Commit 184f79ef authored by zty's avatar zty Committed by GitHub

feat: support code in headings (#2488)

Co-authored-by: 's avatarzty <zty.dev@outlook.com>
parent 35f0861d
import { marked } from "..";
import { matcher } from "../matcher";
import InlineCode from "./InlineCode";
import Link from "./Link";
import PlainLink from "./PlainLink";
import PlainText from "./PlainText";
......@@ -13,7 +14,7 @@ const renderer = (rawStr: string) => {
}
const level = matchResult[1].length;
const parsedContent = marked(matchResult[2], [], [Link, PlainLink, PlainText]);
const parsedContent = marked(matchResult[2], [], [InlineCode, Link, PlainLink, PlainText]);
if (level === 1) {
return <h1>{parsedContent}</h1>;
} else if (level === 2) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment