mirror of
https://github.com/danog/blackfriday.git
synced 2024-11-30 04:29:13 +01:00
block.go: set fenceLength (#505)
This commit is contained in:
parent
8bfdaf1a43
commit
0a297615e6
2
block.go
2
block.go
@ -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))
|
||||
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user