diff options
Diffstat (limited to 'lib/page/html.js')
-rw-r--r-- | lib/page/html.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/page/html.js b/lib/page/html.js index ea31a06..71b29b2 100644 --- a/lib/page/html.js +++ b/lib/page/html.js @@ -129,17 +129,19 @@ HTMLPipeline.prototype.transformHeadings = function() { // Outline SVG from the HML HTMLPipeline.prototype.transformSvgs = function() { + var that = this; + return this._transform('svg', function($svg) { var content = [ '<?xml version="1.0" encoding="UTF-8"?>', - renderDOM(this.$, $svg) + renderDOM(that.$, $svg) ].join('\n'); - return Promise(this.opts.onOutputSVG(content)) + return Promise(that.opts.onOutputSVG(content)) .then(function(filename) { if (!filename) return; - $svg.replaceWith(this.$('<img>').attr('src', filename)); + $svg.replaceWith(that.$('<img>').attr('src', filename)); }); }); }; |