diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-28 18:34:09 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-28 18:34:09 +0100 |
commit | 4baaa41ac9a5ee16422bb922550bef7991026c9b (patch) | |
tree | b40d52b74213d43efa9cde138183137c9adff9a0 | |
parent | 1f7d349aedf6e75122b568aa3e90e016c6903f09 (diff) | |
download | gitbook-4baaa41ac9a5ee16422bb922550bef7991026c9b.zip gitbook-4baaa41ac9a5ee16422bb922550bef7991026c9b.tar.gz gitbook-4baaa41ac9a5ee16422bb922550bef7991026c9b.tar.bz2 |
Fix for good path resolution of svg image
-rw-r--r-- | lib/utils/page.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/utils/page.js b/lib/utils/page.js index 647f557..0166288 100644 --- a/lib/utils/page.js +++ b/lib/utils/page.js @@ -97,7 +97,7 @@ function normalizeHtml(src, options) { // Replace extension if (isExternal) { - dest = path.basename(src, ext)+".png"; + dest = path.basename(srcAbs, ext)+".png"; } else { dest = path.join(path.dirname(srcAbs), path.basename(srcAbs, ext)+".png"); dest = dest[0] == "/"? dest.slice(1) : dest; @@ -123,7 +123,7 @@ function normalizeHtml(src, options) { dest: path.join("./", dest) }); - src = dest; + src = path.join("/", dest); } // Reset as relative to output |