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

Function normalizeLine

internal/diff/resolver.go:301–306  ·  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

299// normalizeLine removes leading/trailing whitespace and strips any leading
300// '+' or '-' diff marker.
301func normalizeLine(s string) string {
302 s = strings.TrimSpace(s)
303 s = strings.TrimPrefix(s, "+")
304 s = strings.TrimPrefix(s, "-")
305 return strings.TrimSpace(s)
306}

Callers 4

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

Calls

no outgoing calls

Tested by 1

TestNormalizeLineFunction · 0.56