Use [x] not [X] for asciidoctor checklists.

See #7798.
This commit is contained in:
John MacFarlane 2022-01-29 17:47:35 -08:00
parent 6bb047690e
commit c348c4d4fe
2 changed files with 3 additions and 3 deletions

View file

@ -353,12 +353,12 @@ bulletListItemToAsciiDoc opts blocks = do
contents <> cr
-- | 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 = handleTaskListItem toOrg listExt
where
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
listExt = extensionsFromList [Ext_task_lists]

View file

@ -89,7 +89,7 @@ tests = [ testGroup "emphasis"
[ testAsciidoctor "bullet task list" $
bulletList [plain "☐ a", plain "☒ b"] =?> unlines
[ "* [ ] a"
, "* [X] b"
, "* [x] b"
]
]
]