mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
13 lines
289 B
JavaScript
13 lines
289 B
JavaScript
const { read } = require('to-vfile');
|
|
const remark = require('remark');
|
|
const html = require('remark-html');
|
|
|
|
(async () => {
|
|
const path = './example.md';
|
|
const file = await read(path);
|
|
const contents = await remark()
|
|
.use(html)
|
|
.process(file);
|
|
console.log(contents);
|
|
})();
|