Skip to content

Commit

Permalink
block.go: set fenceLength
Browse files Browse the repository at this point in the history
  • Loading branch information
bobertlo committed Nov 20, 2018
1 parent 8bfdaf1 commit 10f5161
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions block.go
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ func (p *Markdown) fencedCodeBlock(data []byte, doRender bool) int {
if beg == 0 || beg >= len(data) {
return 0
}
fenceLength := beg - 1

var work bytes.Buffer
work.Write([]byte(info))
Expand Down Expand Up @@ -706,6 +707,7 @@ func (p *Markdown) fencedCodeBlock(data []byte, doRender bool) int {
if doRender {
block := p.addBlock(CodeBlock, work.Bytes()) // TODO: get rid of temp buffer
block.IsFenced = true
block.FenceLength = fenceLength
finalizeCodeBlock(block)
}

Expand Down

0 comments on commit 10f5161

Please sign in to comment.