From c348c4d4fe99048fcf7380619ac6f6e02c533a72 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 29 Jan 2022 17:47:35 -0800 Subject: [PATCH] Use `[x]` not `[X]` for asciidoctor checklists. See #7798. --- src/Text/Pandoc/Writers/AsciiDoc.hs | 4 ++-- test/Tests/Writers/AsciiDoc.hs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Text/Pandoc/Writers/AsciiDoc.hs b/src/Text/Pandoc/Writers/AsciiDoc.hs index 92442da3c..35c175994 100644 --- a/src/Text/Pandoc/Writers/AsciiDoc.hs +++ b/src/Text/Pandoc/Writers/AsciiDoc.hs @@ -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] diff --git a/test/Tests/Writers/AsciiDoc.hs b/test/Tests/Writers/AsciiDoc.hs index 1d1e4e068..cb1863fc4 100644 --- a/test/Tests/Writers/AsciiDoc.hs +++ b/test/Tests/Writers/AsciiDoc.hs @@ -89,7 +89,7 @@ tests = [ testGroup "emphasis" [ testAsciidoctor "bullet task list" $ bulletList [plain "☐ a", plain "☒ b"] =?> unlines [ "* [ ] a" - , "* [X] b" + , "* [x] b" ] ] ]