diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-04-11 09:56:13 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-04-11 09:56:13 +0200 |
commit | dabdeb8a807ec9c20d05246e1c1704f9762edae1 (patch) | |
tree | 4524febd5c91dc8fe834b084e8c20dbaa5244588 /lib/output/base.js | |
parent | ecd56315e60e4b90ac69fea97ad1f896ddaecf4e (diff) | |
download | gitbook-dabdeb8a807ec9c20d05246e1c1704f9762edae1.zip gitbook-dabdeb8a807ec9c20d05246e1c1704f9762edae1.tar.gz gitbook-dabdeb8a807ec9c20d05246e1c1704f9762edae1.tar.bz2 |
Fix #1195: fix external images and fix test for it
Diffstat (limited to 'lib/output/base.js')
-rw-r--r-- | lib/output/base.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/output/base.js b/lib/output/base.js index 903323f..a342c1e 100644 --- a/lib/output/base.js +++ b/lib/output/base.js @@ -207,6 +207,10 @@ Output.prototype.onOutputSVG = function(page, svg) { // Output an image as a file // Normalize the relative link Output.prototype.onOutputImage = function(page, imgFile) { + if (location.isExternal(imgFile)) { + return imgFile; + } + imgFile = page.resolveLocal(imgFile); return page.relative(imgFile); }; |