Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update calculate.js

Edit regex to allow "100%" as a valid value for the withSize function
  • Loading branch information...
commit 3babcc0fc3a9b25ec5c04b02524275de643f5ee7 1 parent a9c4173
@dhritzkiv dhritzkiv authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  lib/calculate.js
View
3  lib/calculate.js
@@ -1,4 +1,3 @@
-
exports = module.exports = function Calculate(command) {
command.prototype._aspectIsEqual = function(ar1, ar2) {
var p1 = this.toAspectRatio(ar1);
@@ -78,7 +77,7 @@ exports = module.exports = function Calculate(command) {
// load metadata and prepare size calculations
var fixedWidth = /([0-9]+)x\?/.exec(this.options.video.size);
var fixedHeight = /\?x([0-9]+)/.exec(this.options.video.size);
- var percentRatio = /\b([0-9]{1,2})%/.exec(this.options.video.size);
+ var percentRatio = /\b([0-9]{1,3})%/.exec(this.options.video.size);
var resolution = this.options.keepPixelAspect ? data.video.resolution : data.video.resolutionSquare;
var w, h;
Please sign in to comment.
Something went wrong with that request. Please try again.