diff options
author | James Phillpotts <jphillpotts@scottlogic.co.uk> | 2014-04-10 10:45:54 +0100 |
---|---|---|
committer | James Phillpotts <jphillpotts@scottlogic.co.uk> | 2014-04-10 10:45:54 +0100 |
commit | 435a4b8c99ae739316af1bf5db9fcc8b0cd104ef (patch) | |
tree | 6582238e44762d584798552e831b31f698fabdd2 | |
parent | fb7653bd14c9fa08ad7cc5db1f5acfddd7d37d0b (diff) | |
download | gitbook-435a4b8c99ae739316af1bf5db9fcc8b0cd104ef.zip gitbook-435a4b8c99ae739316af1bf5db9fcc8b0cd104ef.tar.gz gitbook-435a4b8c99ae739316af1bf5db9fcc8b0cd104ef.tar.bz2 |
Use API from node 0.8
-rw-r--r-- | lib/parse/renderer.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/parse/renderer.js b/lib/parse/renderer.js index 534a859..d0ca597 100644 --- a/lib/parse/renderer.js +++ b/lib/parse/renderer.js @@ -46,7 +46,8 @@ GitBookRenderer.prototype.link = function(href, title, text) { var o = this._extra_options; // Relative link, rewrite it to point to github repo if(!parsed.protocol && parsed.path && parsed.path[0] != '/' && o && o.repo && o.dir) { - parsed = url.parse('https://github.com/' + o.repo + '/blob/').resolveObject([o.dir, href].join("/")); + href = url.resolve('https://github.com/' + o.repo + '/blob/', [o.dir, href].join("/")); + parsed = url.parse(href); } // Generate HTML for link |