all: Add org-mode support

Fixes #1483 
See #936
This commit is contained in:
Chase Adams
2017-02-20 23:46:03 -08:00
committed by Bjørn Erik Pedersen
parent a3af4fe46e
commit 86e8dd62f0
10 changed files with 59 additions and 10 deletions

View File

@@ -420,7 +420,11 @@ var (
// rendering engines.
// TODO(bep) inline replace
func (p *Page) replaceDivider(content []byte) []byte {
sections := bytes.Split(content, helpers.SummaryDivider)
summaryDivider := helpers.SummaryDivider
if p.Ext() == "org" {
summaryDivider = []byte("# more")
}
sections := bytes.Split(content, summaryDivider)
// If the raw content has nothing but whitespace after the summary
// marker then the page shouldn't be marked as truncated. This check