Skip to content

Commit

Permalink
feat: Add support for math expression
Browse files Browse the repository at this point in the history
  • Loading branch information
3w36zj6 committed Mar 31, 2024
1 parent 7506f4e commit 3ab7d7b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Binary file modified bun.lockb
Binary file not shown.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"remark-footnotes": "^4.0.1",
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^4.0.0",
"remark-math": "^6.0.0",
"remark-mdx": "^3.0.1",
"remark-parse": "^11.0.0",
"traverse": "^0.6.8",
Expand All @@ -40,6 +41,7 @@
"@types/traverse": "^0.6.36",
"bun-types": "latest",
"esbuild": "^0.20.2",
"micromark-extension-mdx-expression": "^3.0.0",
"textlint-scripts": "^14.0.4",
"textlint-tester": "^14.0.4",
"tsc": "^2.0.4",
Expand Down
4 changes: 3 additions & 1 deletion src/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { unified } from "unified";
//import footnotes from "remark-footnotes";
import frontmatter from "remark-frontmatter";
import remarkGfm from "remark-gfm";
import remarkMath from "remark-math";
import remarkMdx from "remark-mdx";
import remarkParse from "remark-parse";
import type { Node } from "unist";
Expand All @@ -18,7 +19,8 @@ export const parseMarkdown = (text: string): Node => {
.use(remarkParse)
.use(frontmatter, ["yaml"])
.use(remarkGfm)
.use(remarkMdx);
.use(remarkMdx)
.use(remarkMath);
/*.use(footnotes, {
inlineNotes: true
});*/
Expand Down

0 comments on commit 3ab7d7b

Please sign in to comment.