From 6cc284cc8eadf6a1d9099b7f1e2b68b3d1ac4561 Mon Sep 17 00:00:00 2001 From: claremacrae Date: Mon, 19 Aug 2013 20:45:31 +0100 Subject: Bullet and ordered lists now always simple in dokuwiki writer (#386) --- src/Text/Pandoc/Writers/DokuWiki.hs | 5 ++--- tests/writer.dokuwiki | 43 +++++++++++++------------------------ 2 files changed, 17 insertions(+), 31 deletions(-) diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs index 523c4d180..0f62e98c3 100644 --- a/src/Text/Pandoc/Writers/DokuWiki.hs +++ b/src/Text/Pandoc/Writers/DokuWiki.hs @@ -275,9 +275,8 @@ definitionListItemToDokuWiki opts (label, items) = do isSimpleList :: Block -> Bool isSimpleList x = case x of - BulletList items -> all isSimpleListItem items - OrderedList (num, sty, _) items -> all isSimpleListItem items && - num == 1 && sty `elem` [DefaultStyle, Decimal] + BulletList items -> True + OrderedList (num, sty, _) items -> True DefinitionList items -> all isSimpleListItem $ concatMap snd items _ -> False diff --git a/tests/writer.dokuwiki b/tests/writer.dokuwiki index 4b9d459c8..e881f3510 100644 --- a/tests/writer.dokuwiki +++ b/tests/writer.dokuwiki @@ -157,11 +157,10 @@ and using spaces: Multiple paragraphs: -
    -
  1. Item 1, graf one.

    -

    Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.

  2. -
  3. Item 2.

  4. -
  5. Item 3.

+ - Item 1, graf one. +Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. + - Item 2. + - Item 3. ===== Nested ===== @@ -196,32 +195,20 @@ Same thing but with paragraphs: ===== Fancy list markers ===== -
    -
  1. begins with 2
  2. -
  3. and now 3

    -

    with a continuation

    -
      -
    1. sublist with roman numerals, starting with 4
    2. -
    3. more items -
        -
      1. a subsublist
      2. -
      3. a subsublist
      -
    -
+ - begins with 2 + - and now 3 +with a continuation + - sublist with roman numerals, starting with 4 + - more items + - a subsublist + - a subsublist Nesting: -
    -
  1. Upper Alpha -
      -
    1. Upper Roman. -
        -
      1. Decimal start with 6 -
          -
        1. Lower alpha with paren
        -
      -
    -
+ - Upper Alpha + - Upper Roman. + - Decimal start with 6 + - Lower alpha with paren Autonumbering: -- cgit v1.2.3