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

Allow custom delimiter for background images #239

Conversation

alex-bowers
Copy link
Contributor

Hopefully, this is a solution for #238

There are some image URLs that include commas and this is perfectly valid. Which means a single URL like the example below is currently being broken up into multiple images, when we use data-background-image.

https://cloudinary-res.cloudinary.com/image/upload/dpr_1,f_auto,q_auto,w_960/b_rgb:eeeeee/v1589377362/website/home-redesign/cloudinary_web_homepage_hero_image.png

The simplest way to fix this issue is to allow the user to choose their own delimiter. Each use case may be different.

I've needed to create this so that I could use a delimiter of a comma and a space, , . I've added a clearer example of a dash to the readme.

@ApoorvSaxena
Copy link
Owner

@alex-bowers would have loved to see accompanying test cases with PR :)

@ApoorvSaxena ApoorvSaxena merged commit 738d777 into ApoorvSaxena:master May 23, 2020
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 this pull request may close these issues.

None yet

2 participants