10 lines
263 B
JavaScript
10 lines
263 B
JavaScript
|
|
import { unified } from "unified";
|
|
import remarkParse from "remark-parse";
|
|
import remarkMath from "remark-math";
|
|
|
|
const text = "C) $2 \\text{ m}$";
|
|
const tree = unified().use(remarkParse).use(remarkMath).parse(text);
|
|
console.log(JSON.stringify(tree, null, 2));
|
|
|