1
0
mirror of https://git.sr.ht/~adnano/kiln synced 2024-09-19 01:31:36 +02:00

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
}
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