MCPcopy Create free account
hub / github.com/cli/cli / appendParagraph

Function appendParagraph

internal/attachments/attach.go:79–88  ·  view source on GitHub ↗

appendParagraph joins two pieces of markdown as separate paragraphs.

(md, addition string)

Source from the content-addressed store, hash-verified

77
78// appendParagraph joins two pieces of markdown as separate paragraphs.
79func appendParagraph(md, addition string) string {
80 if addition == "" {
81 return md
82 }
83 md = strings.TrimRight(md, " \t\r\n")
84 if md == "" {
85 return addition
86 }
87 return md + "\n\n" + addition
88}

Callers 2

TestAppendParagraphFunction · 0.85
appendUnreferencedFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestAppendParagraphFunction · 0.68