mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Revert "Use bufferpool in Asciidoc handler"
This reverts commit 068a77151e
.
This was hasty. We would need to create a copy to use the pool in this case.
This commit is contained in:
parent
7c125ebb7d
commit
d44bb4ec05
1 changed files with 2 additions and 5 deletions
|
@ -23,8 +23,6 @@ import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
"github.com/spf13/hugo/bufferpool"
|
|
||||||
|
|
||||||
"github.com/miekg/mmark"
|
"github.com/miekg/mmark"
|
||||||
"github.com/mitchellh/mapstructure"
|
"github.com/mitchellh/mapstructure"
|
||||||
"github.com/russross/blackfriday"
|
"github.com/russross/blackfriday"
|
||||||
|
@ -475,9 +473,8 @@ func getAsciidocContent(content []byte) []byte {
|
||||||
jww.INFO.Println("Rendering with", path, "...")
|
jww.INFO.Println("Rendering with", path, "...")
|
||||||
cmd := exec.Command(path, "--no-header-footer", "--safe", "-")
|
cmd := exec.Command(path, "--no-header-footer", "--safe", "-")
|
||||||
cmd.Stdin = bytes.NewReader(cleanContent)
|
cmd.Stdin = bytes.NewReader(cleanContent)
|
||||||
out := bufferpool.GetBuffer()
|
var out bytes.Buffer
|
||||||
defer bufferpool.PutBuffer(out)
|
cmd.Stdout = &out
|
||||||
cmd.Stdout = out
|
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
jww.ERROR.Println(err)
|
jww.ERROR.Println(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue