We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My .md file:
--- locale: en-US UID: whatever type: type --- My TEST content
source, err := os.ReadFile(path) if err != nil { ...... } markdown := goldmark.New( goldmark.WithExtensions( meta.New( meta.WithStoresInDocument(), ), ), ) document := markdown.Parser().Parse(text.NewReader(source)) metaData := document.OwnerDocument().Meta() fmt.Printf("%s\n", string(document.Text(source))) fmt.Printf("METADATA: %#v\n", metaData)
OUTPUT:
---locale: en-USUID: whatevertype: typeMy TEST content METADATA: map[string]interface {}{}
@yuin Is there any way to debug this? Or at least throw an error to understand why the metadata can't be loaded?
The text was updated successfully, but these errors were encountered:
I tried to uncomment this line to debug it and here is the output
Document { Heading { RawText: "--- locale: en-US UID: whatever type: type" HasBlankPreviousLines: true Level: 2 Text(SoftLineBreak): "---" Text(SoftLineBreak): "locale: en-US" Text(SoftLineBreak): "UID: whatever" Text: "type: type" } Paragraph { RawText: "My TEST content" HasBlankPreviousLines: true Text: "My TEST content" } }
Sorry, something went wrong.
No branches or pull requests
My .md file:
OUTPUT:
@yuin Is there any way to debug this? Or at least throw an error to understand why the metadata can't be loaded?
The text was updated successfully, but these errors were encountered: