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

Case-insensitive regexes for checking image extensions #270 #278

Merged
merged 4 commits into from
May 9, 2017
Merged

Case-insensitive regexes for checking image extensions #270 #278

merged 4 commits into from
May 9, 2017

Conversation

ryki2658
Copy link
Contributor

@ryki2658 ryki2658 commented May 6, 2017

…image extensions

Copy link

@HappyDash HappyDash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it better to have regex as global variable

@emackey
Copy link

emackey commented May 6, 2017

Fixes #270

Copy link

@emackey emackey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the regex!

@@ -169,7 +168,7 @@ var jimpSupportedExtensions = ['.png', '.jpg', '.jpeg', '.bmp'];
function generateJimpImage(object) {
var pipelineExtras = object.extras._pipeline;
var ext = pipelineExtras.extension;
if (jimpSupportedExtensions.indexOf(ext) === -1) {
if (supportedExtensions.test(ext)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be !supportedExtensions.test(ext)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like me and @mramato replied at about the same time.

Copy link
Contributor Author

@ryki2658 ryki2658 May 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mramato @lilleyse Silly mistake sorry . I appreciate the patience with me muddling my way through this first attempt at GitHub and my first attempt at contributing to a "real" project. I hope I haven't been to much of a disturbance in the operation of things for everyone. Thank you for allowing me to participate.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't be so hard on yourself. We are were all first time committers at some point. We are happy to help and appreciate your help.

@mramato
Copy link
Contributor

mramato commented May 8, 2017

Thanks @ryki2658, the tests are failing because you reversed the if check. Previously it was checking if the extension was not in the list, now it's checking if it is in the list. You need to add a ! in front of the check and then this will be ready.

@mramato
Copy link
Contributor

mramato commented May 9, 2017

Thanks again, @ryki2658.

@mramato mramato merged commit 94b89ab into CesiumGS:master May 9, 2017
@ryki2658
Copy link
Contributor Author

ryki2658 commented May 9, 2017

No problem happy to be involved!

@coveralls
Copy link

Coverage Status

Coverage remained the same at 93.804% when pulling ad02448 on ryki2658:master into ce48e5f on AnalyticalGraphicsInc:master.

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.

6 participants