Fix .RawContent for empty content pages (#11407)

Fixes #11406
This commit is contained in:
Bjørn Erik Pedersen
2023-08-30 11:11:20 +03:00
committed by GitHub
parent a7b93e6564
commit 3a8aad6b19
2 changed files with 23 additions and 18 deletions

View File

@@ -328,6 +328,7 @@ func (p *pageState) RawContent() string {
if start == -1 {
start = 0
}
return string(p.source.parsed.Input()[start:])
}
@@ -727,9 +728,7 @@ Loop:
frontMatterSet = true
next := iter.Peek()
if !next.IsDone() {
p.source.posMainContent = next.Pos()
}
p.source.posMainContent = next.Pos()
if !p.s.shouldBuild(p) {
// Nothing more to do.