fix: trying to fix error in matching code
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user