Files
freeCodeCamp/tools/challenge-parser/parser/tools/inspect-ast.js
Oliver Eyton-Williams a3a678b7af chore: remove old parser
2021-02-02 09:51:02 +05:30

14 lines
353 B
JavaScript

const { read } = require('to-vfile');
const remark = require('remark');
const html = require('remark-html');
const { inspect } = require('util');
(async () => {
const path = './example.md';
const file = await read(path);
await remark()
.use(() => tree => console.log(inspect(tree, null, null, true)))
.use(html)
.process(file);
})();