diff options
Diffstat (limited to 'lib/book.js')
-rw-r--r-- | lib/book.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/book.js b/lib/book.js index cadc9f5..4e4279a 100644 --- a/lib/book.js +++ b/lib/book.js @@ -456,6 +456,9 @@ Book.prototype.parseGlossary = function() { Book.prototype.parsePage = function(filename, options) { var that = this, page = {}; options = _.defaults(options || {}, { + // Transform svg images + convertImages: false, + // Interpolate before templating interpolateTemplate: _.identity, @@ -514,14 +517,20 @@ Book.prototype.parsePage = function(filename, options) { // Prepare html .then(function(_page) { - page.sections = pageUtil.normalize(_page.sections, { + return pageUtil.normalize(_page.sections, { + book: that, + convertImages: options.convertImages, input: filename, navigation: that.navigation, base: path.dirname(filename) || './', output: path.dirname(filename) || './', glossary: that.glossary }); + }) + // Interpolate output + .then(function(_sections) { + page.sections = _sections; return interpolate(options.interpolateContent); }) |