summaryrefslogtreecommitdiffstats
path: root/hugolib/page_output.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-08 13:45:33 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-27 15:43:56 +0200
commitc8fff9501d424882a42f750800d9982ec47df640 (patch)
tree03b49241a12ddcf98212959b8e3c7f954ae94685 /hugolib/page_output.go
parent3ec5fc35043639e7592819014180666b1a8e926b (diff)
Implement the first generic JSON output testcase
Diffstat (limited to 'hugolib/page_output.go')
-rw-r--r--hugolib/page_output.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/hugolib/page_output.go b/hugolib/page_output.go
index 50605bddf..45df23388 100644
--- a/hugolib/page_output.go
+++ b/hugolib/page_output.go
@@ -26,7 +26,6 @@ type PageOutput struct {
}
func newPageOutput(p *Page, createCopy bool, outputType output.Type) *PageOutput {
- // TODO(bep) output avoid copy of first?
if createCopy {
p = p.copy()
}
@@ -36,7 +35,5 @@ func newPageOutput(p *Page, createCopy bool, outputType output.Type) *PageOutput
// copy creates a copy of this PageOutput with the lazy sync.Once vars reset
// so they will be evaluated again, for word count calculations etc.
func (p *PageOutput) copy() *PageOutput {
- c := *p
- c.Page = p.Page.copy()
- return &c
+ return newPageOutput(p.Page, true, p.outputType)
}