🎨 Parsing YAML Front Matter as document custom attributes when importing Markdown files https://github.com/siyuan-note/siyuan/issues/10878

This commit is contained in:
Daniel 2024-09-11 18:07:29 +08:00
parent b182d9699e
commit 91f74a8546
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 41 additions and 1 deletions

View file

@ -979,6 +979,7 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {
func parseStdMd(markdown []byte) (ret *parse.Tree) {
luteEngine := util.NewStdLute()
luteEngine.SetYamlFrontMatter(true) // 解析 YAML Front Matter https://github.com/siyuan-note/siyuan/issues/10878
ret = parse.Parse("", markdown, luteEngine.ParseOptions)
if nil == ret {
return