diff --git a/src/Renderer/TOC.hs b/src/Renderer/TOC.hs index a5d6590e4..50eb9db72 100644 --- a/src/Renderer/TOC.hs +++ b/src/Renderer/TOC.hs @@ -157,7 +157,7 @@ tableOfContentsBy selector = fromMaybe [] . evalDiff diffAlgebra (Just a, Just []) -> Just [Changed a] (_ , entries) -> entries Var v -> join (envLookup v env) - Patch patch -> foldMap (\ t -> maybe (fold t) (Just . pure . patchEntry patch) (selector t)) patch + Patch patch -> foldMap (\ t -> fold t <> (pure . patchEntry patch <$> selector t)) patch patchEntry = these (const Deleted) (const Inserted) (const (const Replaced)) . unPatch