Skip to content

Commit b6fbd7e

Browse files
committed
fixes #1
1 parent 1541e5d commit b6fbd7e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/css-sprite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = function (opt) {
2828
var queue = function (img) {
2929
sprites.push({
3030
'img': (!opt.base64) ? img : null,
31-
'name': replaceExtension(file.relative, ''),
31+
'name': replaceExtension(file.relative, '').replace(/\/|\\/g, '-'),
3232
'x': (!opt.base64) ? (opt.orientation === 'vertical' ? opt.margin : ctxWidth + opt.margin) : 0,
3333
'y': (!opt.base64) ? (opt.orientation === 'vertical' ? ctxHeight + opt.margin: opt.margin) : 0,
3434
'width': img.width,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "css-sprite",
3-
"version": "0.6.1",
3+
"version": "0.6.2",
44
"description": "css sprite generator",
55
"license": "MIT",
66
"repository": {

0 commit comments

Comments
 (0)