Download bin/cli/tui-components/MarkdownView.jsx from rais133/omniroute: direct link, hf CLI and curl.
- Browser
- Download file 442 Bytes
-
https://huggingface.co/spaces/rais133/omniroute/resolve/main/bin/cli/tui-components/MarkdownView.jsx
- Command line
-
hf download hf://spaces/rais133/omniroute/bin/cli/tui-components/MarkdownView.jsx
-
curl -L -o MarkdownView.jsx https://huggingface.co/spaces/rais133/omniroute/resolve/main/bin/cli/tui-components/MarkdownView.jsx
442 Bytes
| import React from "react"; | |
| import { Text } from "ink"; | |
| export function MarkdownView({ content = "" }) { | |
| // Render markdown as plain text with basic bold/italic stripping. | |
| // For rich rendering, use marked-terminal externally before passing content. | |
| const clean = content | |
| .replace(/\*\*(.+?)\*\*/g, "$1") | |
| .replace(/\*(.+?)\*/g, "$1") | |
| .replace(/`(.+?)`/g, "$1") | |
| .replace(/^#+\s+/gm, ""); | |
| return <Text>{clean}</Text>; | |
| } | |