diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-02-06 15:28:53 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-02-06 15:28:53 +0100 |
commit | bb7e081a37a98fe1303dc7937c76c2422936f838 (patch) | |
tree | ee4cfb5223c3b887aedd4c1a3fad4cc6e7792f9c /lib/utils/page.js | |
parent | c3ffa5e0ef425fe941e21a3d7937cbc149336d0e (diff) | |
download | gitbook-bb7e081a37a98fe1303dc7937c76c2422936f838.zip gitbook-bb7e081a37a98fe1303dc7937c76c2422936f838.tar.gz gitbook-bb7e081a37a98fe1303dc7937c76c2422936f838.tar.bz2 |
Fix #588: Fix replacement of glossary terms by links
Diffstat (limited to 'lib/utils/page.js')
-rw-r--r-- | lib/utils/page.js | 3 |
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>"; }); }); }); |