Download packages/cli/src/ui/utils/InlineMarkdownRenderer.tsx from SaylorTwift/gemini-cli: direct link, hf CLI and curl.
- Browser
- Download file 650 Bytes
-
https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/cli/src/ui/utils/InlineMarkdownRenderer.tsx
- Command line
-
hf download hf://SaylorTwift/gemini-cli/packages/cli/src/ui/utils/InlineMarkdownRenderer.tsx
-
curl -L -o InlineMarkdownRenderer.tsx https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/cli/src/ui/utils/InlineMarkdownRenderer.tsx
650 Bytes
| /** | |
| * @license | |
| * Copyright 2025 Google LLC | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| import React from 'react'; | |
| import { Text } from 'ink'; | |
| import { parseMarkdownToANSI } from './markdownParsingUtils.js'; | |
| import { stripUnsafeCharacters } from './textUtils.js'; | |
| interface RenderInlineProps { | |
| text: string; | |
| defaultColor?: string; | |
| } | |
| const RenderInlineInternal: React.FC<RenderInlineProps> = ({ | |
| text: rawText, | |
| defaultColor, | |
| }) => { | |
| const text = stripUnsafeCharacters(rawText); | |
| const ansiText = parseMarkdownToANSI(text, defaultColor); | |
| return <Text>{ansiText}</Text>; | |
| }; | |
| export const RenderInline = React.memo(RenderInlineInternal); | |