diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-08-10 14:59:59 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-08-10 14:59:59 -0700 |
commit | ec896289841297e5d7cdcc433b8db3fa90508d6d (patch) | |
tree | 75bb78acc01cbee94738bf0ff590714e4d2eba8c /src/Text/Pandoc | |
parent | 9752dcd61aa72a9e1e59bafcd55376ab1d275620 (diff) | |
download | pandoc-ec896289841297e5d7cdcc433b8db3fa90508d6d.tar.gz |
Avoid a non-exhaustive pattern match.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/Docx/Lists.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Docx/Lists.hs b/src/Text/Pandoc/Readers/Docx/Lists.hs index 49ea71601..0be363f3d 100644 --- a/src/Text/Pandoc/Readers/Docx/Lists.hs +++ b/src/Text/Pandoc/Readers/Docx/Lists.hs @@ -183,14 +183,13 @@ blocksToDefinitions' defAcc acc pair = if remainingAttr2 == ("", [], []) then (concatMap plainParaInlines blks1, [blks2]) else (concatMap plainParaInlines blks1, [[Div remainingAttr2 blks2]]) in blocksToDefinitions' (pair : defAcc) acc blks -blocksToDefinitions' defAcc acc +blocksToDefinitions' ((defTerm, defItems):defs) acc (Div (ident2, classes2, kvs2) blks2 : blks) - | (not . null) defAcc && "Definition" `elem` classes2 = + | "Definition" `elem` classes2 = let remainingAttr2 = (ident2, delete "Definition" classes2, kvs2) defItems2 = case remainingAttr2 == ("", [], []) of True -> blks2 False -> [Div remainingAttr2 blks2] - ((defTerm, defItems):defs) = defAcc defAcc' = case null defItems of True -> (defTerm, [defItems2]) : defs False -> (defTerm, init defItems ++ [last defItems ++ defItems2]) : defs |