Spaces:
Paused
Paused
Download src/utils/markdown.ts from GraziePrego/deepresearch: direct link, hf CLI and curl.
- Browser
- Download file 350 Bytes
-
https://huggingface.co/spaces/GraziePrego/deepresearch/resolve/main/src/utils/markdown.ts
- Command line
-
hf download hf://spaces/GraziePrego/deepresearch/src/utils/markdown.ts
-
curl -L -o markdown.ts https://huggingface.co/spaces/GraziePrego/deepresearch/resolve/main/src/utils/markdown.ts
350 Bytes
| import { marked } from "marked"; | |
| export function markdownToDoc(markdown: string): string { | |
| const html = marked.parse(markdown); | |
| // Word can open an HTML document saved with a ".doc" extension. | |
| // This function returns that minimal HTML wrapper. | |
| return `<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>${html}</body></html>`; | |
| } | |