SVG sprites & stacks galore — Gulp plugin wrapping around svg-sprite that reads in a bunch of SVG files, optimizes them and creates SVG sprites and CSS resources in various flavours
MIT License
648
stars
43
forks
source link
Unexpected behavior because gulp-svg-sprite removes line-breaks...? #46
I'm wondering is there a config option to prevent gulp-svg-sprite from removing the line-breaks from the svg source. I have an svg with a really long <path> that runs several lines. But gulp-svg-sprite seems to be doing some sort of minification when it creates the sprite.
I manually pasted the original unminified path back into the right spot in the sprite, with all the original line-breaks, and it fixes the broken image (but of course that won't stay, because it rebuilds each time I run the build task).
I'm wondering is there a config option to prevent gulp-svg-sprite from removing the line-breaks from the svg source. I have an svg with a really long
<path>
that runs several lines. But gulp-svg-sprite seems to be doing some sort of minification when it creates the sprite.It takes an svg that looks like this:
original.svg:
...and because of the minification, causes it to render like this:
sprite.svg:
I manually pasted the original unminified path back into the right spot in the sprite, with all the original line-breaks, and it fixes the broken image (but of course that won't stay, because it rebuilds each time I run the build task).
Any ideas on what I could do in this case?