Fix UI issues, timer logic, theme switcher, view solutions, and markdown rendering
This commit is contained in:
18
parse2.js
Normal file
18
parse2.js
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
import { unified } from "unified";
|
||||
import remarkParse from "remark-parse";
|
||||
import remarkMath from "remark-math";
|
||||
import rehypeKatex from "rehype-katex";
|
||||
import remarkRehype from "remark-rehype";
|
||||
import rehypeStringify from "rehype-stringify";
|
||||
|
||||
const text = "The velocity of a particle moving along the x-axis is given by $v(t) = \\int_{0}^{t} (3\\tau^2 - 2\\tau) d\\tau$. What is the displacement of the particle at $t = 2$ seconds if it starts from the origin?";
|
||||
const tree = unified()
|
||||
.use(remarkParse)
|
||||
.use(remarkMath)
|
||||
.use(remarkRehype)
|
||||
.use(rehypeKatex, { strict: "warn", throwOnError: false })
|
||||
.use(rehypeStringify)
|
||||
.processSync(text);
|
||||
console.log(tree.toString());
|
||||
|
||||
Reference in New Issue
Block a user