MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / normalizeOutput

Function normalizeOutput

cli/src/utils/markdown-renderer.tsx:992–1007  ·  view source on GitHub ↗
(nodes: ReactNode[])

Source from the content-addressed store, hash-verified

990}
991
992const normalizeOutput = (nodes: ReactNode[]): ReactNode => {
993 const trimmed = trimTrailingWhitespaceNodes(nodes)
994 if (trimmed.length === 0) {
995 return ''
996 }
997 if (trimmed.length === 1) {
998 return trimmed[0]
999 }
1000 return (
1001 <>
1002 {trimmed.map((node, idx) => (
1003 <KeyedFragment key={`markdown-out-${idx}`}>{node}</KeyedFragment>
1004 ))}
1005 </>
1006 )
1007}
1008
1009export function renderMarkdown(
1010 markdown: string,

Callers 1

renderMarkdownFunction · 0.85

Calls 1

Tested by

no test coverage detected