normalizeFrontmatterText normalizes frontmatter text for consistent hashing Removes leading/trailing whitespace and normalizes line endings
(text string)
| 291 | // normalizeFrontmatterText normalizes frontmatter text for consistent hashing |
| 292 | // Removes leading/trailing whitespace and normalizes line endings |
| 293 | func normalizeFrontmatterText(text string) string { |
| 294 | // Normalize Windows line endings to Unix |
| 295 | normalized := strings.ReplaceAll(text, "\r\n", "\n") |
| 296 | // Trim leading and trailing whitespace |
| 297 | return strings.TrimSpace(normalized) |
| 298 | } |
| 299 | |
| 300 | func validateFrontmatterHashInputSize(normalizedFrontmatterText string, normalizedImportedFrontmatterTexts []string) error { |
| 301 | totalBytes := len(normalizedFrontmatterText) |
no outgoing calls
no test coverage detected