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

Function trimTrailingBreaks

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

Source from the content-addressed store, hash-verified

156}
157
158const trimTrailingBreaks = (nodes: ReactNode[]): ReactNode[] => {
159 return trimTrailingNodes(
160 nodes,
161 (node) => typeof node === 'string' && /^\n+$/.test(node),
162 )
163}
164
165const splitNodesByNewline = (nodes: ReactNode[]): ReactNode[][] => {
166 const lines: ReactNode[][] = [[]]

Callers 1

renderListFunction · 0.85

Calls 1

trimTrailingNodesFunction · 0.85

Tested by

no test coverage detected