diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-02-07 20:39:15 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-02-07 20:39:15 +0100 |
commit | 489f23f74e6eb6fc44867004675e5c5379ca74d3 (patch) | |
tree | e3c8754bbe70e0b048257bb37fa9fa957e9cb673 | |
parent | 370799ac555676bbef44fe27a569307b7e0d5232 (diff) | |
download | gitbook-489f23f74e6eb6fc44867004675e5c5379ca74d3.zip gitbook-489f23f74e6eb6fc44867004675e5c5379ca74d3.tar.gz gitbook-489f23f74e6eb6fc44867004675e5c5379ca74d3.tar.bz2 |
Fix #595: calcul link to glossary as an absolute path
-rw-r--r-- | lib/utils/page.js | 2 | ||||
-rw-r--r-- | test/glossary.js | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/utils/page.js b/lib/utils/page.js index a83e641..ccf5dfa 100644 --- a/lib/utils/page.js +++ b/lib/utils/page.js @@ -211,7 +211,7 @@ function normalizeHtml(src, options) { 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+"</a>"; + return "<a href='"+links.toAbsolute("/GLOSSARY.html", options.base, options.output)+"#"+term.id+"' class='glossary-term' title='"+term.description+"'>"+match+"</a>"; }); }); }); diff --git a/test/glossary.js b/test/glossary.js index da2cbb1..5deb04c 100644 --- a/test/glossary.js +++ b/test/glossary.js @@ -28,7 +28,8 @@ describe('Glossary Generation', function () { var $body = $(".page-inner"); var $a = $("a[href='../GLOSSARY.html#test']"); assert($a.length == 1); - assert($a.text() == "a test text"); + assert($a.text() == "test"); + assert($a.attr("title") == "a test text"); }, done); }); }); |