(normalizedFrontmatterText string, normalizedImportedFrontmatterTexts []string)
| 298 | } |
| 299 | |
| 300 | func validateFrontmatterHashInputSize(normalizedFrontmatterText string, normalizedImportedFrontmatterTexts []string) error { |
| 301 | totalBytes := len(normalizedFrontmatterText) |
| 302 | for _, text := range normalizedImportedFrontmatterTexts { |
| 303 | totalBytes += len(text) |
| 304 | } |
| 305 | |
| 306 | if totalBytes > maxFrontmatterHashInputBytes { |
| 307 | return fmt.Errorf("frontmatter hash input exceeds %d bytes after normalization", maxFrontmatterHashInputBytes) |
| 308 | } |
| 309 | |
| 310 | return nil |
| 311 | } |
| 312 | |
| 313 | // extractImportsFromText extracts import paths from frontmatter text using simple text parsing. |
| 314 | // For the array form, extracts all top-level array items under "imports:". |
no test coverage detected