Merge pull request #221 from nauzilus/toc-fix Fix ToC generator to work with base
diff --git a/code.js b/code.js
index fe9a679..02a3c27 100644
--- a/code.js
+++ b/code.js
@@ -71,7 +71,7 @@ $$('body > section > h1').forEach(function(h1) {
contents: {
tag: 'a',
properties: {
- href: '#' + (h1.id || section.id)
+ href: window.location.pathname + '#' + (h1.id || section.id)
},
contents: text
},