Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't handle multiple references to the same URL #39

Open
bagby opened this issue Jul 6, 2016 · 1 comment
Open

doesn't handle multiple references to the same URL #39

bagby opened this issue Jul 6, 2016 · 1 comment

Comments

@bagby
Copy link

bagby commented Jul 6, 2016

Given the input

.sample-img-small   { width:  50px; height:  50px; background-image:url(/images/defs.svg#plus) }
.sample-img-medium  { width:  80px; height:  80px; background-image:url(/images/defs.svg#plus) }
.sample-img-large   { width: 120px; height: 120px; background-image:url(/images/defs.svg#plus) }
.sample-img-xlarge  { width: 240px; height: 240px; background-image:url(/images/defs.svg#plus) }

with options

{
  assetMap: {
    'images/defs.svg': 'assets/images/defs.svg'
  },
  prepend: 'https://cloudfront.net/'
}

Expected:

.sample-img-small   { width:  50px; height:  50px; background-image:url(https://cloudfront.net/assets/images/defs.svg#plus) }
.sample-img-medium  { width:  80px; height:  80px; background-image:url(https://cloudfront.net/assets/images/defs.svg#plus) }
.sample-img-large   { width: 120px; height: 120px; background-image:url(https://cloudfront.net/assets/images/defs.svg#plus) }
.sample-img-xlarge  { width: 240px; height: 240px; background-image:url(https://cloudfront.net/assets/images/defs.svg#plus) }

Actual:

.sample-img-small   { width:  50px; height:  50px; background-image:url(https://cloudfront.net/assets/assets/assets/assets/assets/assets/assets/assets/images/defs.svg#plus) }
.sample-img-medium  { width:  80px; height:  80px; background-image:url(https://cloudfront.net/assets/assets/assets/assets/assets/assets/assets/assets/images/defs.svg#plus) }
.sample-img-large   { width: 120px; height: 120px; background-image:url(https://cloudfront.net/assets/assets/assets/assets/assets/assets/assets/assets/images/defs.svg#plus) }
.sample-img-xlarge  { width: 240px; height: 240px; background-image:url(https://cloudfront.net/assets/assets/assets/assets/assets/assets/assets/assets/images/defs.svg#plus) }

(note the 8 nested assets folders)

I have a failing test, working on a PR now...

@jamesarosen
Copy link

What is customHash here? I don't see a fingerprint in the output, so I'm guessing you have customHash: null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants