diff options
author | nasirkhan <nasir8891@gmail.com> | 2015-02-27 22:16:11 +0600 |
---|---|---|
committer | nasirkhan <nasir8891@gmail.com> | 2015-02-27 22:16:11 +0600 |
commit | eac513cfa370e1303dcd6ff3842d4f15b9eaf5f4 (patch) | |
tree | 1cdf5d823dc5bd0498cc48a359084949abb6acfb /lib/utils | |
parent | 62c99759c1f3998720179f4230a2210ef6c8f836 (diff) | |
parent | 5ec8a1f18c881a3bc17924ba103241f387eb0289 (diff) | |
download | gitbook-eac513cfa370e1303dcd6ff3842d4f15b9eaf5f4.zip gitbook-eac513cfa370e1303dcd6ff3842d4f15b9eaf5f4.tar.gz gitbook-eac513cfa370e1303dcd6ff3842d4f15b9eaf5f4.tar.bz2 |
Merge remote-tracking branch 'upstream/version/2.0' into version/2.0
Diffstat (limited to 'lib/utils')
-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); |