(c []byte)
| 128 | var yamlPattern = regexp.MustCompile(`(?m)^---\r?\n(\s*\r?\n)?`) |
| 129 | |
| 130 | func detectFrontmatter(c []byte) []int { |
| 131 | if matches := yamlPattern.FindAllIndex(c, 2); len(matches) > 1 { |
| 132 | return []int{matches[0][0], matches[1][1]} |
| 133 | } |
| 134 | return []int{-1, -1} |
| 135 | } |
no outgoing calls
no test coverage detected