aboutsummaryrefslogtreecommitdiff
path: root/document_parser.go
diff options
context:
space:
mode:
authorShulhan <m.shulhan@gmail.com>2020-12-08 01:05:57 +0700
committerShulhan <m.shulhan@gmail.com>2020-12-08 01:06:03 +0700
commit8f50b1676835ecf4d7d43196e95c05abe98c3ac7 (patch)
tree0696c67393bc32c5306810fa2a9a19f4f8fb82e4 /document_parser.go
parent50dda5f85522398aab399c238bd156a8636b9e0a (diff)
downloadasciidoctor-go-8f50b1676835ecf4d7d43196e95c05abe98c3ac7.tar.xz
all: add support for checklist in unordered list
Diffstat (limited to 'document_parser.go')
-rw-r--r--document_parser.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/document_parser.go b/document_parser.go
index 8334489..59a382a 100644
--- a/document_parser.go
+++ b/document_parser.go
@@ -1071,6 +1071,12 @@ func (docp *documentParser) parseListUnordered(parent, node *adocNode, line stri
listItem.parseListUnorderedItem(line)
list.level = listItem.level
list.addChild(listItem)
+ for _, role := range listItem.roles {
+ list.addRole(role)
+ if role == classNameChecklist {
+ list.rawStyle = role
+ }
+ }
parent.addChild(list)
var c rune
@@ -1136,6 +1142,12 @@ func (docp *documentParser) parseListUnordered(parent, node *adocNode, line stri
node.parseListUnorderedItem(line)
if listItem.level == node.level {
list.addChild(node)
+ for _, role := range listItem.roles {
+ list.addRole(role)
+ if role == classNameChecklist {
+ list.rawStyle = role
+ }
+ }
listItem = node
line = ""
continue