From: Bjørn Erik Pedersen Date: Sun, 10 Jul 2016 17:42:14 +0000 (+0200) Subject: Revert "Use bufferpool in Asciidoc handler" X-Git-Tag: v0.17~242 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d44bb4ec;p=brevno-suite%2Fhugo 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. --- diff --git a/helpers/content.go b/helpers/content.go index 6da437b3..d1b3d787 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) }