From 387831810b10f8f14ce32bb041dd4d94e55bdde4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20R=C3=BCger?= Date: Thu, 25 Jan 2024 16:36:03 +0100 Subject: [PATCH] Fix: Set a default empty space and title --- pkg/mark/meta.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/mark/meta.go b/pkg/mark/meta.go index 6e3ec024..12a87dff 100644 --- a/pkg/mark/meta.go +++ b/pkg/mark/meta.go @@ -84,9 +84,7 @@ func ExtractMeta(data []byte, spaceFromCli string, titleFromH1 bool, parents []s } if meta == nil { - meta = &Meta{} - meta.Type = "page" // Default if not specified - meta.ContentAppearance = FullWidthContentAppearance // Default to full-width for backwards compatibility + meta = &Meta{Space: "", Title: "", Type: "page", ContentAppearance: FullWidthContentAppearance} } //nolint:staticcheck @@ -148,7 +146,7 @@ func ExtractMeta(data []byte, spaceFromCli string, titleFromH1 bool, parents []s if titleFromH1 || spaceFromCli != "" { if meta == nil { - meta = &Meta{} + meta = &Meta{Space: "", Title: "", Type: "page", ContentAppearance: FullWidthContentAppearance} } if meta.Type == "" {