Download ant-design/scripts/visual-regression/convert.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 426 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/ant-design/scripts/visual-regression/convert.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/ant-design/scripts/visual-regression/convert.ts
-
curl -L -o convert.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/ant-design/scripts/visual-regression/convert.ts
426 Bytes
| import rehypeFigure from '@microflash/rehype-figure'; | |
| import rehypeStringify from 'rehype-stringify'; | |
| import { remark } from 'remark'; | |
| import remarkGfm from 'remark-gfm'; | |
| import remarkRehype from 'remark-rehype'; | |
| export default function markdown2Html(content: string) { | |
| return remark() | |
| .use(remarkGfm) | |
| .use(remarkRehype) | |
| .use(rehypeFigure) | |
| .use(rehypeStringify) | |
| .processSync(content) | |
| .toString(); | |
| } | |