git.iko.soy/typeable/pandoc
on master help sign in
HTML writer: Slight change in code for generating unique
608b22efiddlosopher
src/Text/Pandoc/Writers/HTML.hs+1−1
@@ -198,7 +198,7 @@ uniqueIdentifiers ls =
198 let addIdentifier (nonuniqueIds, uniqueIds) l =
198 let addIdentifier (nonuniqueIds, uniqueIds) l =
199 let new = inlineListToIdentifier l
199 let new = inlineListToIdentifier l
200 matches = length $ filter (== new) nonuniqueIds
200 matches = length $ filter (== new) nonuniqueIds
201− new' = new ++ if matches > 0 then show matches else ""
201+ new' = new ++ if matches > 0 then ("-" ++ show matches) else ""
202 in (new:nonuniqueIds, new':uniqueIds)
202 in (new:nonuniqueIds, new':uniqueIds)
203 in reverse $ snd (foldl addIdentifier ([],[]) $ ls)
203 in reverse $ snd (foldl addIdentifier ([],[]) $ ls)
204
204