shithub: hugo

Download patch

ref: d44bb4ec05553b95ef601bf3951e5755b1cbd5a0
parent: 7c125ebb7db8c8af0d48e2141b38d0a78fd74b6e
author: Bjørn Erik Pedersen <[email protected]>
date: Sun Jul 10 15:42:14 EDT 2016

Revert "Use bufferpool in Asciidoc handler"

This reverts commit 068a77151e27adb4106e86c407831ad6aa34ad8d.

This was hasty. We would need to create a copy to use the pool in this case.

--- a/helpers/content.go
+++ b/helpers/content.go
@@ -23,8 +23,6 @@
 	"os/exec"
 	"unicode/utf8"
 
-	"github.com/spf13/hugo/bufferpool"
-
 	"github.com/miekg/mmark"
 	"github.com/mitchellh/mapstructure"
 	"github.com/russross/blackfriday"
@@ -475,9 +473,8 @@
 	jww.INFO.Println("Rendering with", path, "...")
 	cmd := exec.Command(path, "--no-header-footer", "--safe", "-")
 	cmd.Stdin = bytes.NewReader(cleanContent)
-	out := bufferpool.GetBuffer()
-	defer bufferpool.PutBuffer(out)
-	cmd.Stdout = out
+	var out bytes.Buffer
+	cmd.Stdout = &out
 	if err := cmd.Run(); err != nil {
 		jww.ERROR.Println(err)
 	}