Avoid a non-exhaustive pattern match.
This commit is contained in:
parent
9752dcd61a
commit
ec89628984
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue