mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
add attributes config
This commit is contained in:
parent
2a31867397
commit
23b83e7e51
1 changed files with 2 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ import (
|
|||
)
|
||||
|
||||
type fencedCodeBlockParser struct {
|
||||
AttributeConfig
|
||||
}
|
||||
|
||||
var defaultFencedCodeBlockParser = &fencedCodeBlockParser{}
|
||||
|
|
@ -64,7 +65,7 @@ func (b *fencedCodeBlockParser) Open(parent ast.Node, reader text.Reader, pc Con
|
|||
}
|
||||
node := ast.NewFencedCodeBlock(info)
|
||||
// add attributes
|
||||
if info != nil {
|
||||
if b.Attribute && info != nil {
|
||||
infoText := info.Text(reader.Source())
|
||||
pos := bytes.IndexByte(infoText, '{')
|
||||
if pos > -1 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue