Skip to content

Commit

Permalink
Fix missing var and bump to 1.4.17
Browse files Browse the repository at this point in the history
  • Loading branch information
exupero committed Jan 27, 2020
1 parent f88d054 commit 9648466
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,12 @@ <h3>Preview <button class="save btn">Save as PNG</button></h3>
</svg>
</li>

<li id=exclude-unused-css>
<svg width="200" height="200">
<rect x=50 y=50 width=100 height=100 fill="green"></rect>
</svg>
</li>

<li id=custom-font>
<svg width=200 height=200>
<text x=100 y=100 text-anchor=middle dy=14 style="font-family:'Stalemate';font-size:36pt;">Custom Fonts</text>
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ inlineTest('Transformed text', $('#transformed-text'));
inlineTest('With marker-end', $('#marker-end'));
inlineTest('SVG style attribute', $('#style-background'));
inlineTest('SVG within SVG', $('#svg-in-svg'));
inlineTest('excluding unused CSS', $('#exclude-unused-css'), {excludeUnusedCss: true});
inlineTest('With custom fonts', $('#custom-font'));

const $sandbox = $('#sandbox');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "save-svg-as-png",
"version": "1.4.16",
"version": "1.4.17",
"description": "Convert a browser SVG to PNG or dataUri",
"main": "lib/saveSvgAsPng.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/saveSvgAsPng.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@
selectorRemap,
modifyStyle,
modifyCss,
fonts
fonts,
excludeUnusedCss
} = options || {};
const generateCss = modifyCss || ((selector, properties) => {
const sel = selectorRemap ? selectorRemap(selector) : selector;
Expand Down

0 comments on commit 9648466

Please sign in to comment.