@@ -309,31 +309,17 @@ definitionListItemToDokuWiki opts (label, items) = do
309309isSimpleList :: Block -> Bool
310310isSimpleList x =
311311 case x of
312− BulletList items -> all isSimpleListItem items
313− OrderedList (num, sty, _) items -> all isSimpleListItem items &&
314− num == 1 && sty `elem` [DefaultStyle, Decimal]
315− DefinitionList items -> all isSimpleListItem $ concatMap snd items
316− _ -> False
312+ BulletList items -> all isSimpleListItem items
313+ OrderedList (1, _, _) items -> all isSimpleListItem items
314+ DefinitionList items -> all (all isSimpleListItem . snd) items
315+ _ -> False
317316
318317-- | True if list item can be handled with the simple wiki syntax. False if
319318-- HTML tags will be needed.
320319isSimpleListItem :: [Block] -> Bool
321320isSimpleListItem [] = True
322−isSimpleListItem [x] =
323− case x of
324− Plain _ -> True
325− Para _ -> True
326− BulletList _ -> isSimpleList x
327− OrderedList _ _ -> isSimpleList x
328− DefinitionList _ -> isSimpleList x
329− _ -> False
330−isSimpleListItem [x, y] | isPlainOrPara x =
331− case y of
332− BulletList _ -> isSimpleList y
333− OrderedList _ _ -> isSimpleList y
334− DefinitionList _ -> isSimpleList y
335− CodeBlock _ _ -> True
336− _ -> False
321+isSimpleListItem [x, CodeBlock{}] | isPlainOrPara x = True
322+isSimpleListItem (x:ys) | isPlainOrPara x = all isSimpleList ys
337323isSimpleListItem _ = False
338324
339325isPlainOrPara :: Block -> Bool