aboutsummaryrefslogtreecommitdiff
path: root/document_parser.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-08-13 00:21:14 +0700
committerShulhan <ms@kilabit.info>2024-08-13 00:21:14 +0700
commit741463b99f14f1869c804cd4c6b15be155a7c27e (patch)
treeea793bb911a250e5bbc5d5bc8e0e69409eb9163b /document_parser.go
parent8628bc2cc75ad1069fcb1e633e02e04132c348e9 (diff)
downloadasciidoctor-go-741463b99f14f1869c804cd4c6b15be155a7c27e.tar.xz
all: add element kind Section 0
The elKindSection0 is the Document Title, the line that start with "= ".
Diffstat (limited to 'document_parser.go')
-rw-r--r--document_parser.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/document_parser.go b/document_parser.go
index 3b529fc..5f13fcf 100644
--- a/document_parser.go
+++ b/document_parser.go
@@ -702,7 +702,7 @@ func (docp *documentParser) parseHeader() {
if !ok {
return
}
- if docp.kind == lineKindText && isTitle(line) {
+ if docp.kind == elKindSectionL0 {
docp.doc.header.Write(bytes.TrimSpace(line[2:]))
docp.doc.Title.raw = string(docp.doc.header.raw)