mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 01:13:08 +00:00
Trim newlines after page title
This commit is contained in:
parent
e00ca65aee
commit
5c1f645617
2
kiln.go
2
kiln.go
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue