diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-02-26 01:14:27 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-02-26 01:14:27 +0100 |
commit | c923a7e01a7eb3f12587f75ff07e94a6adbec08d (patch) | |
tree | e43de5a6cb310e6bbf461a4151f52edf475d7c91 /lib/utils/page.js | |
parent | 366e6ed105816e0bec64ea9eadc1e6089ee3c15b (diff) | |
download | gitbook-c923a7e01a7eb3f12587f75ff07e94a6adbec08d.zip gitbook-c923a7e01a7eb3f12587f75ff07e94a6adbec08d.tar.gz gitbook-c923a7e01a7eb3f12587f75ff07e94a6adbec08d.tar.bz2 |
Fix transformation of README.md links in index.html
Diffstat (limited to 'lib/utils/page.js')
-rw-r--r-- | lib/utils/page.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/utils/page.js b/lib/utils/page.js index fce800b..cdc7d1a 100644 --- a/lib/utils/page.js +++ b/lib/utils/page.js @@ -189,8 +189,10 @@ function normalizeHtml(src, options) { if (links.isRelative(href)) { var absolutePath = path.join(options.base, href); - // If is in navigation relative: change extsnio nto be .html - if (options.navigation[absolutePath]) href = links.changeExtension(href, ".html"); + // If is in navigation relative: transform as content + if (options.navigation[absolutePath]) { + href = options.book.contentLink(href); + } // Transform as absolute href = links.toAbsolute(href, options.base, options.output); |