hugolib: Add check for p.Markup == "org"
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 21 Feb 2017 07:49:04 +0000 (08:49 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 21 Feb 2017 07:49:04 +0000 (08:49 +0100)
To be improved.

hugolib/page.go

index 07d073c9e59861d08b4ac4ba9a5f9790941640a0..18e33d0b3096d0b299506019277296c7c874402b 100644 (file)
@@ -421,7 +421,8 @@ var (
 // TODO(bep) inline replace
 func (p *Page) replaceDivider(content []byte) []byte {
        summaryDivider := helpers.SummaryDivider
-       if p.Ext() == "org" {
+       // TODO(bep) handle better.
+       if p.Ext() == "org" || p.Markup == "org" {
                summaryDivider = []byte("# more")
        }
        sections := bytes.Split(content, summaryDivider)