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

Function normalizeLine

internal/diff/resolver.go:232–237  ·  view source on GitHub ↗

normalizeLine removes leading/trailing whitespace and strips any leading '+' or '-' diff marker (mirrors Java's processTargetLineCode).

(s string)

Source from the content-addressed store, hash-verified

230// normalizeLine removes leading/trailing whitespace and strips any leading
231// '+' or '-' diff marker (mirrors Java's processTargetLineCode).
232func normalizeLine(s string) string {
233 s = strings.TrimSpace(s)
234 s = strings.TrimPrefix(s, "+")
235 s = strings.TrimPrefix(s, "-")
236 return strings.TrimSpace(s)
237}

Callers 4

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

Calls

no outgoing calls

Tested by 1

TestNormalizeLineFunction · 0.56