MCPcopy Create free account
hub / github.com/Noumena-Network/code / pushMarkdownSegment

Function pushMarkdownSegment

src/utils/markdown.ts:133–151  ·  view source on GitHub ↗
(
  segments: MarkdownSegment[],
  content: string,
)

Source from the content-addressed store, hash-verified

131}
132
133function pushMarkdownSegment(
134 segments: MarkdownSegment[],
135 content: string,
136): void {
137 if (content.length === 0) {
138 return
139 }
140
141 const last = segments.at(-1)
142 if (last?.type === 'markdown') {
143 last.content += content
144 return
145 }
146
147 segments.push({
148 type: 'markdown',
149 content,
150 })
151}
152
153function splitPipeCells(line: string): string[] {
154 let trimmed = line.trim()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected