From d44bb4ec05553b95ef601bf3951e5755b1cbd5a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 10 Jul 2016 19:42:14 +0200 Subject: [PATCH] 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. --- helpers/content.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/helpers/content.go b/helpers/content.go index 6da437b3d..d1b3d787d 100644 --- a/helpers/content.go +++ b/helpers/content.go @@ -23,8 +23,6 @@ import ( "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 @@ func getAsciidocContent(content []byte) []byte { 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) }