MCPcopy Create free account
hub / github.com/github/gh-aw / applyContentTransformers

Function applyContentTransformers

pkg/workflow/expression_extraction.go:65–73  ·  view source on GitHub ↗

applyContentTransformers runs content through each transformer in order, logging changes, and returns the fully-transformed content.

(content string, transformers []contentTransformer)

Source from the content-addressed store, hash-verified

63// applyContentTransformers runs content through each transformer in order,
64// logging changes, and returns the fully-transformed content.
65func applyContentTransformers(content string, transformers []contentTransformer) string {
66 for _, t := range transformers {
67 if transformed := t(content); transformed != content {
68 expressionExtractionLog.Printf("Transformed expression: %s -> %s", content, transformed)
69 content = transformed
70 }
71 }
72 return content
73}
74
75// addSubExpressionMappings registers a synthetic ExpressionMapping for every
76// qualifying terminal sub-expression inside a compound expression so that the

Callers 1

processMatchMethod · 0.85

Calls 1

PrintfMethod · 0.45

Tested by

no test coverage detected