MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / stripQuotedReplies

Function stripQuotedReplies

internal/mailparse/parse.go:267–272  ·  view source on GitHub ↗

stripQuotedReplies cuts the text at the first quoted-reply / forwarded marker and removes any trailing ">"-quoted lines. Conservative: only well-known markers trigger a cut (over-stripping is acceptable; raw is always available).

(text string)

Source from the content-addressed store, hash-verified

265// and removes any trailing ">"-quoted lines. Conservative: only well-known
266// markers trigger a cut (over-stripping is acceptable; raw is always available).
267func stripQuotedReplies(text string) string {
268 if loc := quoteMarker.FindStringIndex(text); loc != nil {
269 text = text[:loc[0]]
270 }
271 return strings.TrimRight(text, " \t\r\n")
272}
273
274// normalizeWhitespace collapses runs of blank lines and trims trailing spaces
275// per line, so the parsed view is compact without losing paragraph structure.

Callers 1

ParseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected