From 5c1f64561769ccd4e5c64a80d52f3bd5149843d0 Mon Sep 17 00:00:00 2001 From: adnano Date: Tue, 22 Sep 2020 21:15:03 -0400 Subject: [PATCH] Trim newlines after page title --- kiln.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kiln.go b/kiln.go index dfeb437..016dfbe 100644 --- a/kiln.go +++ b/kiln.go @@ -125,7 +125,7 @@ type Page struct { Content string } -var titleRE = regexp.MustCompile("^# ?([^#\r\n]+)") +var titleRE = regexp.MustCompile("^# ?([^#\r\n]+)\r?\n?\r?\n?") func NewPage(path string, content string) *Page { // Try to parse the date from the page filename