WIP
This commit is contained in:
@@ -23,6 +23,8 @@ func DetectType(markdownContent string) (string, error) {
|
||||
return "", fmt.Errorf("failed to compile template: %w", err)
|
||||
}
|
||||
|
||||
fmt.Println("Content:", markdownContent)
|
||||
|
||||
blocks := matcher.MatchBlocksFuzzy(markdownContent, defaultSchema, 0.3)
|
||||
|
||||
result, err := decoders.Parse(blocks)
|
||||
@@ -30,6 +32,8 @@ func DetectType(markdownContent string) (string, error) {
|
||||
return "", fmt.Errorf("failed to parse blocks: %w", err)
|
||||
}
|
||||
|
||||
fmt.Println("Result: ", result)
|
||||
|
||||
if result, ok := result.(map[string]any); ok {
|
||||
if contentType, ok := result["@type"]; ok {
|
||||
return contentType.(string), nil
|
||||
|
Reference in New Issue
Block a user