Detect keyword 'linear' on lines containing word 'animation' too #10989

Merged
merged 3 commits into from Jun 20, 2015

Projects

None yet

2 participants

@petetnt
Member
petetnt commented Apr 23, 2015

Fixes #10984

@MarcelGerber MarcelGerber and 1 other commented on an outdated diff Jun 19, 2015
...ult/InlineTimingFunctionEditor/TimingFunctionUtils.js
@@ -42,7 +42,7 @@ define(function (require, exports, module) {
BEZIER_CURVE_GENERAL_REGEX = /cubic-bezier\((.*)\)/,
EASE_STRICT_REGEX = /[: ,]ease(?:-in)?(?:-out)?[ ,;]/,
EASE_LAX_REGEX = /ease(?:-in)?(?:-out)?/,
- LINEAR_STRICT_REGEX = /transition.*?[: ,]linear[ ,;]/,
+ LINEAR_STRICT_REGEX = /transition|animation.*?[: ,]linear[ ,;]/,
@MarcelGerber
MarcelGerber Jun 19, 2015 Member

This should actually be between parenthesis, like this: (transition|animation).*?[: ,]linear[ ,;]

@petetnt
petetnt Jun 19, 2015 Member

Yeah you are correct there, don't remember what I was thinking there!

@MarcelGerber MarcelGerber self-assigned this Jun 19, 2015
@MarcelGerber
Member

Could you also add a unit test for this?

@petetnt
Member
petetnt commented Jun 19, 2015

@MarcelGerber for the unit tests, should these tests be just repeated with the animation keyword (the unit tests are the same, just with different word IIRC) or should the existing tests be modified to test for both the ´transition" and "animation" keywords?

@MarcelGerber
Member

It's probably enough to just repeat one or two unit tests with the animation keyword.

@petetnt
Member
petetnt commented Jun 20, 2015

Added the unit tests

@MarcelGerber
Member

Thanks!
Merging.

@MarcelGerber MarcelGerber merged commit 7159b14 into adobe:master Jun 20, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@petetnt petetnt deleted the petetnt:linear-keyword-detection-fix branch Jun 20, 2015
@petetnt
Member
petetnt commented Jun 20, 2015

👍 awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment