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

Function normalizeLine

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

233// normalizeLine removes leading/trailing whitespace and strips any leading
234// '+' or '-' diff marker.
235func normalizeLine(s string) string {
236 s = strings.TrimSpace(s)
237 s = strings.TrimPrefix(s, "+")
238 s = strings.TrimPrefix(s, "-")
239 return strings.TrimSpace(s)
240}

Callers 4

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

Calls

no outgoing calls

Tested by 1

TestNormalizeLineFunction · 0.56