fix: trying to fix error in matching code

This commit is contained in:
Max Richter
2025-09-28 14:40:29 +02:00
parent fb0b80be78
commit 57ea1f6e3e
12 changed files with 39 additions and 14 deletions

View File

@@ -26,6 +26,9 @@ func DetectType(markdownContent string) (string, error) {
blocks := matcher.MatchBlocksFuzzy(markdownContent, defaultSchema, 0.3)
fmt.Printf("%+v\n", blocks[0])
fmt.Printf("Content: '%q'\n", blocks[0].GetContent())
result, err := decoders.Parse(blocks)
if err != nil {
return "", fmt.Errorf("failed to parse blocks -> %w", err)
@@ -37,6 +40,7 @@ func DetectType(markdownContent string) (string, error) {
}
return "", fmt.Errorf("frontmatter did not contain '_type'")
}
return "", fmt.Errorf("could not parse frontmatter")
}