-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
If a variable is used inside a math calculation, the whole calculation is not minified.
It probably has something to do with the parenthesis.
Example 1
?(1 * (1 * (1 * (1 * (1 * (1 * (1 * (1 * (x * 1)))))))))This doesn't get minified, as it has the variable.
However, turning x into a 1 makes the minified result ?1
Expected Result
?xActual Result
?1*(1*(1*(1*(1*(1*(1*(1*(a*1))))))))Example 2
?(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (x + 1)))))))))This gives the same type of result.
Expected Result
?x+9Actual Result
?1+(1+(1+(1+(1+(1+(1+(1+(a+1))))))))Example 3
x = (9 * (2 * y)) * 4Taking out the parenthesis fixes this problem (Example 4)
Expected Result
x = 72 * yActual Result
a=9*(2*b)*4Example 4
x = 9 * 2 * y * 4While this fixes the minification problem, it causes a new one: The left and right half are merged separately.
Expected Result
x = 72 * yActual Result
a=18*b*4Outro
Well, that's what I've found so far. Hope it helps with some minification stuff.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels