MCPcopy Create free account
hub / github.com/github/gh-aw / reconstructContent

Function reconstructContent

pkg/cli/yaml_frontmatter_utils.go:26–36  ·  view source on GitHub ↗

reconstructContent rebuilds the full markdown content from frontmatter lines and body

(frontmatterLines []string, markdown string)

Source from the content-addressed store, hash-verified

24
25// reconstructContent rebuilds the full markdown content from frontmatter lines and body
26func reconstructContent(frontmatterLines []string, markdown string) string {
27 var lines []string
28 lines = append(lines, "---")
29 lines = append(lines, frontmatterLines...)
30 lines = append(lines, "---")
31 if markdown != "" {
32 lines = append(lines, "")
33 lines = append(lines, markdown)
34 }
35 return strings.Join(lines, "\n")
36}
37
38// parseFrontmatterLines extracts frontmatter lines from content
39func parseFrontmatterLines(content string) ([]string, string, error) {

Callers 2

TestReconstructContentFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestReconstructContentFunction · 0.68