sanitizeInstructionMarkdown strips HTML comments, invisible Unicode characters, and CRLF line endings from instruction file content.
(content string)
| 302 | // Unicode characters, and CRLF line endings from instruction |
| 303 | // file content. |
| 304 | func sanitizeInstructionMarkdown(content string) string { |
| 305 | content = strings.ReplaceAll(content, "\r\n", "\n") |
| 306 | content = strings.ReplaceAll(content, "\r", "\n") |
| 307 | content = markdownCommentPattern.ReplaceAllString(content, "") |
| 308 | content = invisibleRunePattern.ReplaceAllString(content, "") |
| 309 | return strings.TrimSpace(content) |
| 310 | } |
| 311 | |
| 312 | // discoverSkills walks the given skills directories and returns |
| 313 | // metadata for every valid skill it finds. Body and supporting |
no outgoing calls
no test coverage detected