diff options
| author | Nikolai Korobeinikov <31213770+ricnorr@users.noreply.github.com> | 2022-01-16 22:05:19 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-16 11:05:19 -0800 |
| commit | b683b8d48aaa68d5e01c000c7641c1337903a586 (patch) | |
| tree | d5628b94c864d2d2a88714a9d356de8d5fc47ea1 /test/Tests | |
| parent | 1e4829730482665e3e251ac570428dbfc0785ab0 (diff) | |
Support checklists in asciidoctor writer (#7832)
The checklist syntax (similar to `task_list` in markdown) seems to be
an asciidoctor-only addition.
Co-authored-by: ricnorr <ricnorr@yandex-tream.ru>
Diffstat (limited to 'test/Tests')
| -rw-r--r-- | test/Tests/Writers/AsciiDoc.hs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/Tests/Writers/AsciiDoc.hs b/test/Tests/Writers/AsciiDoc.hs index 7b2dd11e8..1d1e4e068 100644 --- a/test/Tests/Writers/AsciiDoc.hs +++ b/test/Tests/Writers/AsciiDoc.hs @@ -9,7 +9,10 @@ import Text.Pandoc.Arbitrary () import Text.Pandoc.Builder asciidoc :: (ToPandoc a) => a -> String -asciidoc = unpack . purely (writeAsciiDoc def{ writerWrapText = WrapNone }) . toPandoc +asciidoc = unpack . purely (writeAsciiDoc def) . toPandoc + +asciidoctor :: (ToPandoc a) => a -> String +asciidoctor = unpack . purely (writeAsciiDoctor def) . toPandoc testAsciidoc :: (ToString a, ToPandoc a) => String @@ -17,6 +20,12 @@ testAsciidoc :: (ToString a, ToPandoc a) -> TestTree testAsciidoc = test asciidoc +testAsciidoctor :: (ToString a, ToPandoc a) + => String + -> (a, String) + -> TestTree +testAsciidoctor = test asciidoctor + tests :: [TestTree] tests = [ testGroup "emphasis" [ testAsciidoc "emph word before" $ @@ -76,4 +85,12 @@ tests = [ testGroup "emphasis" , "|===" ] ] + , testGroup "lists" + [ testAsciidoctor "bullet task list" $ + bulletList [plain "☐ a", plain "☒ b"] =?> unlines + [ "* [ ] a" + , "* [X] b" + ] + ] ] + |
