diff --git a/src/lib/components/Markdown.ts b/src/lib/components/Markdown.ts index bf2396d..62a7dc2 100644 --- a/src/lib/components/Markdown.ts +++ b/src/lib/components/Markdown.ts @@ -1,11 +1,11 @@ export default Perser; import { remark } from 'remark' -import remarkgfm from 'remark-gfm' +import remarkGfm from 'remark-gfm' import remarkBreaks from "remark-breaks" -import remarkmath from 'remark-math' +import remarkMath from 'remark-math' import remarkRehype from 'remark-rehype' -import rehypeslug from 'rehype-slug' +import rehypeSlug from 'rehype-slug' import rehypeKatex from 'rehype-katex' import rehypeHighlight from 'rehype-highlight' import rehypeExternalLinks from 'rehype-external-links' @@ -16,11 +16,11 @@ import rehypeHeaderLinks from 'rehype-header-links' function Perser(mdtext: string): string { let md = remark() - .use(remarkgfm) // Github Markdown + .use(remarkGfm) // Github Markdown .use(remarkBreaks) // 改行 - .use(remarkmath) // 数式 + .use(remarkMath) // 数式 .use(remarkRehype, {allowDangerousHtml: true}) - .use(rehypeslug) // headingにidを設定 + .use(rehypeSlug) // headingにidを設定 .use(rehypeKatex, {output:'mathml'}) // 数式 .use(rehypeHighlight) // Syntax highlight .use(rehypeExternalLinks, {target:'_blank', rel:['noreferrer','noopener']}) // 外部サイトを新規タブで開く