diff options
| -rw-r--r-- | lib/document-to-html.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js index 1b3a3df..eb7c8e1 100644 --- a/lib/document-to-html.js +++ b/lib/document-to-html.js @@ -30,7 +30,6 @@ function DocumentConversion(options, comments) { var noteReferences = []; var referencedComments = []; - var commentCountByInitials = {}; options = _.extend({ignoreEmptyParagraphs: true}, options); var idPrefix = options.idPrefix === undefined ? "" : options.idPrefix; @@ -247,10 +246,7 @@ function DocumentConversion(options, comments) { function convertCommentReference(reference, messages) { return findHtmlPath(reference, htmlPaths.ignore).wrap(function() { var comment = comments[reference.commentId]; - if (commentCountByInitials[comment.authorInitials] === undefined) { - commentCountByInitials[comment.authorInitials] = 0; - } - var count = ++commentCountByInitials[comment.authorInitials]; + var count = referencedComments.length + 1; var label = "[" + comment.authorInitials + count + "]"; referencedComments.push({label: label, comment: comment}); // TODO: remove duplication with note references |
