Download frontend/src/core/utils/markdown.ts from yonagush/deerflow: direct link, hf CLI and curl.
- Browser
- Download file 266 Bytes
-
https://huggingface.co/spaces/yonagush/deerflow/resolve/main/frontend/src/core/utils/markdown.ts
- Command line
-
hf download hf://spaces/yonagush/deerflow/frontend/src/core/utils/markdown.ts
-
curl -L -o markdown.ts https://huggingface.co/spaces/yonagush/deerflow/resolve/main/frontend/src/core/utils/markdown.ts
266 Bytes
| export function extractTitleFromMarkdown(markdown: string) { | |
| if (markdown.startsWith("# ")) { | |
| let title = markdown.split("\n")[0]!.trim(); | |
| if (title.startsWith("# ")) { | |
| title = title.slice(2).trim(); | |
| } | |
| return title; | |
| } | |
| return undefined; | |
| } | |