HTML writer: Slight change in code for generating unique

identifiers.  The numbers used after duplicate identifiers
are now separated from them by a hyphen:  Duplicate-1
rather than Duplicate1.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@648 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-07-08 03:40:22 +00:00
parent 5b68993a3e
commit 608b22e9dd

View file

@ -198,7 +198,7 @@ uniqueIdentifiers ls =
let addIdentifier (nonuniqueIds, uniqueIds) l =
let new = inlineListToIdentifier l
matches = length $ filter (== new) nonuniqueIds
new' = new ++ if matches > 0 then show matches else ""
new' = new ++ if matches > 0 then ("-" ++ show matches) else ""
in (new:nonuniqueIds, new':uniqueIds)
in reverse $ snd (foldl addIdentifier ([],[]) $ ls)