18 lines
684 B
Go
18 lines
684 B
Go
// Package parser provides functions for parsing Markdown templates into
|
|
// structured JSON objects that conform to a JSON Schema.
|
|
package parser
|
|
|
|
func ParseFile(markdownContent string) (map[string]any, error) {
|
|
|
|
// _schema, err := registry.GetTemplate("Recipe")
|
|
// if err != nil {
|
|
// return nil, fmt.Errorf("could not get schema: %w", err)
|
|
// }
|
|
|
|
// Idea is to split the template into blocks, either "matching" blocks which are simple strings.
|
|
// Or "data" blocks which match the content. Then i want to soft match the "matching" blocks and "data" blocks to the template.
|
|
// The "matching" blocks should soft match with a levenshtein distance
|
|
|
|
return map[string]any{}, nil
|
|
}
|