MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / processFinalDocument

Function processFinalDocument

app/cli/documentation/generate.go:161–165  ·  view source on GitHub ↗

processFinalDocument cleans up the final document by removing excessive newlines and headers.

(content string)

Source from the content-addressed store, hash-verified

159
160// processFinalDocument cleans up the final document by removing excessive newlines and headers.
161func processFinalDocument(content string) string {
162 // Clean up excessive newlines and leftover headers
163 content = regexp.MustCompile(`\n{3,}`).ReplaceAllString(content, "\n\n")
164 return regexp.MustCompile(`(?m)^#+\s*$`).ReplaceAllString(content, "")
165}

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected