summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-02-06 15:28:53 +0100
committerSamy Pessé <samypesse@gmail.com>2015-02-06 15:28:53 +0100
commitbb7e081a37a98fe1303dc7937c76c2422936f838 (patch)
treeee4cfb5223c3b887aedd4c1a3fad4cc6e7792f9c
parentc3ffa5e0ef425fe941e21a3d7937cbc149336d0e (diff)
downloadgitbook-bb7e081a37a98fe1303dc7937c76c2422936f838.zip
gitbook-bb7e081a37a98fe1303dc7937c76c2422936f838.tar.gz
gitbook-bb7e081a37a98fe1303dc7937c76c2422936f838.tar.bz2
Fix #588: Fix replacement of glossary terms by links
-rw-r--r--lib/utils/page.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/utils/page.js b/lib/utils/page.js
index ec91e0b..a83e641 100644
--- a/lib/utils/page.js
+++ b/lib/utils/page.js
@@ -205,12 +205,13 @@ function normalizeHtml(src, options) {
$("*").each(function() {
replaceText($, this, r, function(match) {
+ // Add to files index in glossary
if (!includedInFiles) {
includedInFiles = true;
term.files = term.files || [];
term.files.push(options.navigation[options.input]);
}
- return "<a href='"+links.toAbsolute("GLOSSARY.html", options.base, options.output)+"#"+term.id+"' class='glossary-term' title='"+term.description+"'>"+match+"</span>";
+ return "<a href='"+links.toAbsolute("GLOSSARY.html", options.base, options.output)+"#"+term.id+"' class='glossary-term' title='"+term.description+"'>"+match+"</a>";
});
});
});