aboutsummaryrefslogtreecommitdiff
path: root/document_parser.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2025-02-16 15:43:05 +0700
committerShulhan <ms@kilabit.info>2025-02-16 15:43:05 +0700
commit5aac8b7676140dcb803fc1614334a92698e35429 (patch)
treee9066a340db4fd39ce92cb023589c132add70724 /document_parser.go
parent8daebbd6b41177ee1e0de79257f162aa4b486766 (diff)
downloadasciidoctor-go-5aac8b7676140dcb803fc1614334a92698e35429.tar.xz
all: move setting attribute to Document
Some of attribute may depends on property of the Document.
Diffstat (limited to 'document_parser.go')
-rw-r--r--document_parser.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/document_parser.go b/document_parser.go
index 74c14b6..ca167e6 100644
--- a/document_parser.go
+++ b/document_parser.go
@@ -398,7 +398,7 @@ func (docp *documentParser) parseBlock(parent *element, term int) {
}
el.Attrs[key] = value
} else {
- _ = docp.doc.Attributes.apply(key, value)
+ _ = docp.doc.setAttribute(key, value)
parent.addChild(&element{
kind: docp.kind,
key: key,
@@ -750,7 +750,7 @@ func (docp *documentParser) parseHeader() {
var key, value string
key, value, ok = docp.parseAttribute(line, false)
if ok {
- _ = docp.doc.Attributes.apply(key, value)
+ _ = docp.doc.setAttribute(key, value)
}
line = nil
continue