diff options
Diffstat (limited to 'lib/page')
-rw-r--r-- | lib/page/html.js | 2 | ||||
-rw-r--r-- | lib/page/index.js | 9 |
2 files changed, 2 insertions, 9 deletions
diff --git a/lib/page/html.js b/lib/page/html.js index d667059..45fae0d 100644 --- a/lib/page/html.js +++ b/lib/page/html.js @@ -164,7 +164,7 @@ HTMLPipeline.prototype.applyAnnotations = function() { replaceText(that.$, this, searchRegex, function(match) { that.opts.onAnnotation(annotation); - return '<a href="'+that.opts.onRelativeLink(annotation.href) + '#' + annotation.id+'" ' + return '<a href="' + that.opts.onRelativeLink(annotation.href) + '" ' + 'class="glossary-term" title="'+_.escape(annotation.description)+'">' + match + '</a>'; diff --git a/lib/page/index.js b/lib/page/index.js index 51ed2aa..bdf3c81 100644 --- a/lib/page/index.js +++ b/lib/page/index.js @@ -166,14 +166,7 @@ Page.prototype.toHTML = function(output) { }, // Convert glossary entries to annotations - annotations: _.map(that.book.glossary.entries, function(entry) { - return { - id: entry.id, - name: entry.name, - description: entry.description, - href: '/GLOSSARY.html' - }; - }) + annotations: that.book.glosary.annotations() }; var pipeline = new HTMLPipeline(that.content, pipelineOpts); |