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

Function isMatchingCodeBlockMarker

pkg/workflow/xml_comments.go:173–186  ·  view source on GitHub ↗

isMatchingCodeBlockMarker checks if the trimmed line matches the opening marker

(trimmedLine string, openMarker string)

Source from the content-addressed store, hash-verified

171
172// isMatchingCodeBlockMarker checks if the trimmed line matches the opening marker
173func isMatchingCodeBlockMarker(trimmedLine string, openMarker string) bool {
174 marker, _ := extractCodeBlockMarker(trimmedLine)
175 if marker == "" || openMarker == "" {
176 return false
177 }
178
179 // Markers must be the same type (both backticks or both tildes)
180 if marker[0] != openMarker[0] {
181 return false
182 }
183
184 // Closing marker must have at least as many characters as opening marker
185 return len(marker) >= len(openMarker)
186}

Callers 2

removeXMLCommentsFunction · 0.85

Calls 1

extractCodeBlockMarkerFunction · 0.85

Tested by 1