parent
6bb047690e
commit
c348c4d4fe
2 changed files with 3 additions and 3 deletions
|
@ -353,12 +353,12 @@ bulletListItemToAsciiDoc opts blocks = do
|
||||||
contents <> cr
|
contents <> cr
|
||||||
|
|
||||||
-- | Convert a list item containing text starting with @U+2610 BALLOT BOX@
|
-- | Convert a list item containing text starting with @U+2610 BALLOT BOX@
|
||||||
-- or @U+2612 BALLOT BOX WITH X@ to org checkbox syntax (e.g. @[X]@).
|
-- or @U+2612 BALLOT BOX WITH X@ to asciidoctor checkbox syntax (e.g. @[x]@).
|
||||||
taskListItemToAsciiDoc :: [Block] -> [Block]
|
taskListItemToAsciiDoc :: [Block] -> [Block]
|
||||||
taskListItemToAsciiDoc = handleTaskListItem toOrg listExt
|
taskListItemToAsciiDoc = handleTaskListItem toOrg listExt
|
||||||
where
|
where
|
||||||
toOrg (Str "☐" : Space : is) = Str "[ ]" : Space : is
|
toOrg (Str "☐" : Space : is) = Str "[ ]" : Space : is
|
||||||
toOrg (Str "☒" : Space : is) = Str "[X]" : Space : is
|
toOrg (Str "☒" : Space : is) = Str "[x]" : Space : is
|
||||||
toOrg is = is
|
toOrg is = is
|
||||||
listExt = extensionsFromList [Ext_task_lists]
|
listExt = extensionsFromList [Ext_task_lists]
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ tests = [ testGroup "emphasis"
|
||||||
[ testAsciidoctor "bullet task list" $
|
[ testAsciidoctor "bullet task list" $
|
||||||
bulletList [plain "☐ a", plain "☒ b"] =?> unlines
|
bulletList [plain "☐ a", plain "☒ b"] =?> unlines
|
||||||
[ "* [ ] a"
|
[ "* [ ] a"
|
||||||
, "* [X] b"
|
, "* [x] b"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Reference in a new issue