Resolve error handling/parser related TODOs

See #5324
This commit is contained in:
Bjørn Erik Pedersen
2018-10-23 14:37:09 +02:00
parent f669ef6bec
commit 6636cf1bea
14 changed files with 67 additions and 68 deletions

View File

@@ -1685,9 +1685,13 @@ func (p *Page) shouldRenderTo(f output.Format) bool {
return found
}
// RawContent returns the un-rendered source content without
// any leading front matter.
func (p *Page) RawContent() string {
// TODO(bep) 2errors
return string(p.source.parsed.Input())
if p.source.posMainContent == -1 {
return ""
}
return string(p.source.parsed.Input()[p.source.posMainContent:])
}
func (p *Page) FullFilePath() string {