Avoid double alloc

This commit is contained in:
Dave Johnston 2014-05-03 08:50:44 +01:00
parent 852c1967b9
commit baebdee6de
1 changed files with 1 additions and 1 deletions

View File

@ -332,7 +332,7 @@ func firstPass(p *parser, input []byte) []byte {
// when last line was none blank and a fenced code block comes after
if beg >= lastFencedCodeBlockEnd {
// tmp var so we don't modify beyond bounds of `input`
var tmp = make([]byte, len(input[beg:]))
var tmp = make([]byte, len(input[beg:]), len(input[beg:]) + 1)
copy(tmp, input[beg:])
if i := p.fencedCode(&out, append(tmp, '\n'), false); i > 0 {
if !lastLineWasBlank {