parser/metadecoders: Accumulate org keywords into arrays

Closes #11743
This commit is contained in:
August Feng
2023-11-25 22:33:02 -05:00
committed by Bjørn Erik Pedersen
parent 8915343075
commit 46f618756f
3 changed files with 4 additions and 4 deletions

View File

@@ -249,9 +249,8 @@ func (d Decoder) unmarshalORG(data []byte, v any) error {
k = strings.ToLower(k)
if strings.HasSuffix(k, "[]") {
frontMatter[k[:len(k)-2]] = strings.Fields(v)
} else if k == "tags" || k == "categories" || k == "aliases" {
log.Printf("warn: Please use '#+%s[]:' notation, automatic conversion is deprecated.", k)
frontMatter[k] = strings.Fields(v)
} else if strings.Contains(v, "\n") {
frontMatter[k] = strings.Split(v, "\n")
} else if k == "date" || k == "lastmod" || k == "publishdate" || k == "expirydate" {
frontMatter[k] = parseORGDate(v)
} else {