summaryrefslogtreecommitdiffstats
path: root/lib/output/modifiers/annotateText.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/output/modifiers/annotateText.js')
-rw-r--r--lib/output/modifiers/annotateText.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/output/modifiers/annotateText.js b/lib/output/modifiers/annotateText.js
index d8443cf..2b4b439 100644
--- a/lib/output/modifiers/annotateText.js
+++ b/lib/output/modifiers/annotateText.js
@@ -62,9 +62,10 @@ function replaceText($, el, search, replace, text_only ) {
Annotate text using a list of GlossaryEntry
@param {List<GlossaryEntry>}
+ @param {String} glossaryFilePath
@param {HTMLDom} $
*/
-function annotateText(entries, $) {
+function annotateText(entries, glossaryFilePath, $) {
entries.forEach(function(entry) {
var entryId = entry.getID();
var name = entry.getName();
@@ -81,7 +82,7 @@ function annotateText(entries, $) {
) return;
replaceText($, this, searchRegex, function(match) {
- return '<a href="/GLOSSARY.md#' + entryId + '" '
+ return '<a href="/' + glossaryFilePath + '#' + entryId + '" '
+ 'class="glossary-term" title="' + escape(description) + '">'
+ match
+ '</a>';