From 23b83e7e51312d28c5f62065d6400dc7baf18ea0 Mon Sep 17 00:00:00 2001 From: Dmitry Sedykh Date: Thu, 26 Dec 2019 00:31:21 +0300 Subject: [PATCH] add attributes config --- parser/fcode_block.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parser/fcode_block.go b/parser/fcode_block.go index 9cef7c7..b51b5b7 100644 --- a/parser/fcode_block.go +++ b/parser/fcode_block.go @@ -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 {