diff options
-rw-r--r-- | lib/output/conrefs.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/output/conrefs.js b/lib/output/conrefs.js index af37de8..e58f836 100644 --- a/lib/output/conrefs.js +++ b/lib/output/conrefs.js @@ -5,6 +5,7 @@ var folderOutput = require('./folder'); var Git = require('../utils/git'); var fs = require('../utils/fs'); var pathUtil = require('../utils/path'); +var location = require('../utils/location'); /* Mixin for output to resolve git conrefs @@ -48,10 +49,8 @@ module.exports = function conrefsLoader(Base) { ConrefsLoader.prototype.onResolveTemplate = function(from, to) { // If origin is in the book, we enforce result file to be in the book if (this.book.isInBook(from)) { - return this.book.resolve( - this.book.relative(path.dirname(from)), - to - ); + var href = location.toAbsolute(to, path.dirname(from), ''); + return this.book.resolve(href); } // If origin is in a git repository, we resolve file in the git repository |