MCPcopy Create free account
hub / github.com/alibaba/open-code-review / normalizeLine

Function normalizeLine

internal/diff/resolver.go:314–319  ·  view source on GitHub ↗

normalizeLine removes leading/trailing whitespace and strips any leading '+' or '-' diff marker.

(s string)

Source from the content-addressed store, hash-verified

312// normalizeLine removes leading/trailing whitespace and strips any leading
313// '+' or '-' diff marker.
314func normalizeLine(s string) string {
315 s = strings.TrimSpace(s)
316 s = strings.TrimPrefix(s, "+")
317 s = strings.TrimPrefix(s, "-")
318 return strings.TrimSpace(s)
319}

Callers 4

TestNormalizeLineFunction · 0.70
extractSideLinesFunction · 0.70
resolveFromFileContentFunction · 0.70
splitAndNormalizeFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestNormalizeLineFunction · 0.56