Trim newlines after page title

This commit is contained in:
adnano 2020-09-22 21:15:03 -04:00
parent e00ca65aee
commit 5c1f645617

View file

@ -125,7 +125,7 @@ type Page struct {
Content string 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 { func NewPage(path string, content string) *Page {
// Try to parse the date from the page filename // Try to parse the date from the page filename