mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-24 09:16:43 +00:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user