Skip to content
New issue

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

Fix: Set a default empty space #415

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions pkg/mark/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 == "" {
Expand Down
Loading