Skip to content

Commit d44bb4e

Browse files
committed
Revert "Use bufferpool in Asciidoc handler"
This reverts commit 068a771. This was hasty. We would need to create a copy to use the pool in this case.
1 parent 7c125eb commit d44bb4e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

helpers/content.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ import (
2323
"os/exec"
2424
"unicode/utf8"
2525

26-
"github.com/spf13/hugo/bufferpool"
27-
2826
"github.com/miekg/mmark"
2927
"github.com/mitchellh/mapstructure"
3028
"github.com/russross/blackfriday"
@@ -475,9 +473,8 @@ func getAsciidocContent(content []byte) []byte {
475473
jww.INFO.Println("Rendering with", path, "...")
476474
cmd := exec.Command(path, "--no-header-footer", "--safe", "-")
477475
cmd.Stdin = bytes.NewReader(cleanContent)
478-
out := bufferpool.GetBuffer()
479-
defer bufferpool.PutBuffer(out)
480-
cmd.Stdout = out
476+
var out bytes.Buffer
477+
cmd.Stdout = &out
481478
if err := cmd.Run(); err != nil {
482479
jww.ERROR.Println(err)
483480
}

0 commit comments

Comments
 (0)