diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 12e74b53b..21f07d5e7 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -681,6 +681,10 @@ taskListItemFromAscii = handleTaskListItem fromMd taskListItemToAscii :: Extensions -> [Block] -> [Block] taskListItemToAscii = handleTaskListItem toMd where + toMd [Str "☐"] = [rawMd "[ ]"] + toMd [Str "☒"] = [rawMd "[x]"] + toMd [Str "❏"] = [rawMd "[ ]"] + toMd [Str "✓"] = [rawMd "[x]"] toMd (Str "☐" : Space : is) = rawMd "[ ]" : Space : is toMd (Str "☒" : Space : is) = rawMd "[x]" : Space : is toMd (Str "❏" : Space : is) = rawMd "[ ]" : Space : is diff --git a/test/command/11712.md b/test/command/11712.md new file mode 100644 index 000000000..cd1ae971b --- /dev/null +++ b/test/command/11712.md @@ -0,0 +1,8 @@ +``` +% pandoc -f gfm -t gfm +- [ ] +- [ ] bubbles +^D +- [ ] +- [ ] bubbles +``` diff --git a/test/command/gfm.md b/test/command/gfm.md index 12bd09094..254788690 100644 --- a/test/command/gfm.md +++ b/test/command/gfm.md @@ -220,3 +220,15 @@ hi - [ ] foo - [x] bar ``` + +``` +% pandoc -f native -t gfm +[ BulletList + [ [ Plain [ Str "\9744" ] ] + , [ Plain [ Str "\9746" ] ] + ] +] +^D +- [ ] +- [x] +```