all repos — grayfriday @ baebdee6de0d6524e84a8e8db6ae4592cc93c39b

blackfriday fork with a few changes

Avoid double alloc
Dave Johnston johnsto@gmail.com
Sat, 03 May 2014 08:50:44 +0100
commit

baebdee6de0d6524e84a8e8db6ae4592cc93c39b

parent

852c1967b98c2c8154b98b844867e629f0a4d792

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M markdown.gomarkdown.go

@@ -332,7 +332,7 @@ if p.flags&EXTENSION_FENCED_CODE != 0 {

// 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 {