all repos — grayfriday @ 0a297615e6ea825ded468d85aba546d804d4b5d2

blackfriday fork with a few changes

block.go: set fenceLength (#505)

Robert Lowry bobertlo@gmail.com
Sun, 20 Jan 2019 12:09:27 -0600
commit

0a297615e6ea825ded468d85aba546d804d4b5d2

parent

8bfdaf1a436429305573f9af5d87598ae609529a

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

jump to
M block.goblock.go

@@ -673,6 +673,7 @@ beg, marker := isFenceLine(data, &info, "")

if beg == 0 || beg >= len(data) { return 0 } + fenceLength := beg - 1 var work bytes.Buffer work.Write([]byte(info))

@@ -706,6 +707,7 @@

if doRender { block := p.addBlock(CodeBlock, work.Bytes()) // TODO: get rid of temp buffer block.IsFenced = true + block.FenceLength = fenceLength finalizeCodeBlock(block) }