From 15440a1f592349da4e8bfd34e7edeafd76fbd5a5 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Sun, 24 Oct 2021 22:56:24 -0700 Subject: [PATCH] fix unexpected panic --- README.md | 2 +- main.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 41ce473..ac6392a 100644 --- a/README.md +++ b/README.md @@ -37,4 +37,4 @@ jobs: output: data # output folder index: true # whether to index content ... -``` \ No newline at end of file +``` diff --git a/main.go b/main.go index f0b2e96..2fbb657 100644 --- a/main.go +++ b/main.go @@ -107,7 +107,8 @@ func walk(root, ext string, index bool) (res []Link, i ContentIndex) { frontmatter, body, err := m.Parse(strings.NewReader(text)) if err != nil { - panic(err) + frontmatter = map[string]interface{}{} + body = text } var title string