This commit is contained in:
Mirek Kratochvil 2023-05-27 21:01:20 +02:00
parent adb4ffd5d5
commit 1b93ec5632

View file

@ -233,6 +233,8 @@ sourceTags = do
use pages
htags .= M.fromList (invTags sgat)
-- | Organize a list of pages with hierarchical tags to a list with
-- hierarchical tags with pages attached.
invTags :: [(FilePath, [[String]])] -> [([String], [FilePath])]
invTags x =
map (fmap nub) $ groupSort [(t, p) | (p, htl) <- x, ht <- htl, t <- inits ht]