WIP
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
module git.max-richter.dev/max/marka/parser
|
||||
|
||||
go 1.24.5
|
||||
go 1.25.1
|
||||
|
||||
require (
|
||||
git.max-richter.dev/max/marka/registry v0.0.0-20250817132016-6db87db32567
|
||||
|
@@ -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