Download next.js/examples/blog-with-comment/lib/markdownToHtml.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 277 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/blog-with-comment/lib/markdownToHtml.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/examples/blog-with-comment/lib/markdownToHtml.ts
-
curl -L -o markdownToHtml.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/blog-with-comment/lib/markdownToHtml.ts
277 Bytes
| import type { VFileCompatible } from "vfile"; | |
| import { remark } from "remark"; | |
| import html from "remark-html"; | |
| export default async function markdownToHtml(markdown: VFileCompatible) { | |
| const result = await remark().use(html).process(markdown); | |
| return result.toString(); | |
| } | |