Matthias Mullie
69f3d7ba83
Quote url() uri's with quotes in them
...
Fixes #193
2017-09-11 17:30:59 +02:00
Matthias Mullie
0c62644146
Be stricter when removing whitespace around + & - in selectors
...
Fixes #191
2017-09-07 19:21:39 +02:00
Matthias Mullie
0b3f4f7a26
Add tests for #184
2017-07-06 13:48:28 +02:00
Matthias Mullie
3fcd6421df
Add test for #183
2017-06-13 17:30:29 +02:00
Matthias Mullie
41dc7827da
Don't allow whitespace in unquoted url()
...
Fixed #162
2017-03-14 11:56:47 +01:00
Matthias Mullie
848353ecf2
Quote urls containing #
...
Fixes #165
2017-03-14 11:32:45 +01:00
Matthias Mullie
c4d5176846
Fix url() shortening with data uris containing )
...
Fixes #162
2017-03-14 11:18:46 +01:00
Matthias Mullie
aa50b2dab6
Fix unitless flex-basis, for IE
...
Fixes #159
2017-01-26 16:48:07 +01:00
Matthias Mullie
be5a61820f
Stricter checks for not importing absolute paths
...
Fixes #100
2017-01-26 09:12:17 +01:00
Matthias Mullie
cd15113398
Also simplify external links paths
...
For normal files, @import & url() syntax is unified
already (e.g. removing quotes around the path, where
not needed), but this was not done for external
paths.
This also simplifies the huge regex a little
2017-01-25 16:38:45 +01:00
Matthias Mullie
bc46e8b275
Add test for #150
2016-11-25 08:46:06 +01:00
Matthias Mullie
c0582c8451
Add test for #149
2016-11-23 15:24:58 +01:00
Matthias Mullie
b473affbb7
php-cs-fixer
2016-11-23 11:16:14 +01:00
Matthias Mullie
6340735c46
Fix incorrect color replacement for colors starting with #foo
2016-11-23 11:11:07 +01:00
Matthias Mullie
e93dffc8fa
Don't strip import statements before empty tags
...
Fixes issue #145
2016-11-09 22:15:24 +01:00
Matthias Mullie
1a6cb6b457
Move line-feed normalization, to only affect code files, not file imports
...
Fixes issue #139
2016-10-27 15:32:49 -07:00
Matthias Mullie
089afe6cd8
Merge pull request #132 from eko3alpha/master
...
Feature: Add ability to pass an array as an argument
2016-10-13 13:32:14 +02:00
Matthias Mullie
325e9b9dc1
Fix 0px minification in calc()
...
Fixes issue #137
2016-09-20 14:58:02 +02:00
aalvarado
54bdf69431
Feature: Add ability to pass an array of css and js assets as an argument
...
add() will now accept an array of js/css files, useful when your list of assets live in a config file
Add unit tests
Simplify test harness
2016-08-12 12:44:25 -04:00
Matthias Mullie
3253a81d07
Shorten colors some more if their color name is shorter
...
As suggested on issue #109
2016-06-09 21:35:54 +02:00
Matthias Mullie
1a152541b0
Shorten font weights
...
As suggested on issue #109
2016-06-09 21:34:19 +02:00
Matthias Mullie
10b843d564
Add tests for issue #107
2016-04-27 13:06:55 +02:00
Matthias Mullie
ed61e52fd7
Add tests for issue #104
2016-04-27 12:56:10 +02:00
Matthias Mullie
c7ac2ecd40
Add tests for issue #103
2016-04-27 12:53:57 +02:00
Matthias Mullie
8fa45a1be0
Add test for issue #100
2016-04-27 12:40:09 +02:00
Matthias Mullie
3518f595e5
Restore original Exception class
...
I admit, having just this 1 Exception class in the root of the
project was a bad idea...
But now I can't take it away without breaking backwards compatibility:
people could be catching errors of this class.
So all new Exception classes have to inherit from this old one (it's
not worth breaking BC over, imo)
Also renamed the new ones to be "Exceptions" (plural), to avoid
confusing that namespace with the original exception class name.
2016-02-17 11:43:01 +01:00
Matthias Mullie
b77673f350
php-cs-fixer fixes
2016-02-17 09:58:12 +01:00
Gino Pane
4049b6eed3
Test and prevent file import loops.
...
Issue: https://github.com/matthiasmullie/minify/issues/96
Updates:
- Added css files for testing and a new test-case;
- created new exception types and grouped them into separated directory;
- reuse some parts of the code.
2016-02-15 22:56:01 +03:00
Gino Pane
51bb79449d
Add temporary test
2016-02-15 00:54:21 +03:00
Gino Pane
db9383b8aa
Increase code coverage.
...
- Fix contents of "tests\css\sample\convert_relative_path\source\absolute.css" to test @import without url();
- Change index in array of matches (Minify.php:321) to correctly replace empty strings.
2016-02-09 17:12:30 +03:00
Gino Pane
ea49eeb348
Remove files generated by tests.
2016-02-09 00:37:54 +03:00
Gino Pane
bb08394c10
Temp commit
2016-02-04 23:28:16 +03:00
Matthias Mullie
ad8508130e
Ignore GET-params when converting paths
...
Fixes #77
2016-01-20 10:23:55 +01:00
Matthias Mullie
140c714688
Don't strip } when stripping empty tags preceeded by 2 }s
...
Fixes #92
2016-01-10 18:10:11 -08:00
Matthias Mullie
bf87a5cdc2
Combine imports/import files earlier
...
If we wait until after adjusting the paths relative to the new
target, we may fail to import them because the path they'll be
relative to may not yet exist.
If we do it after moving path
2016-01-06 17:18:37 -08:00
Matthias Mullie
3da112a6a3
Create target dir for tests, it's required to resolve path
2016-01-06 17:10:31 -08:00
Matthias Mullie
13641aee3c
php-cs-fixer fixes
2016-01-06 16:44:12 -08:00
Matthias Mullie
5612427e40
Add tests for symlinked folders
2016-01-06 16:38:59 -08:00
Matthias Mullie
a39e04c6ea
Fix symlink tests
2016-01-06 15:11:54 -08:00
Matthias Mullie
0cd5108683
Add tests for symlinked files
...
Fixes #77
2016-01-04 23:43:18 -08:00
Matthias Mullie
791e81a529
Use more sensible test CSS
2016-01-04 15:57:15 -08:00
Matthias Mullie
a1e9988195
Add test for issue #74
2015-09-21 21:21:48 +02:00
Matthias Mullie
9004585177
Don't swallow entire tags when stripping empties
...
Whenever an empty tag was found, everything before it risked
being eaten because I wasn't strict enough about the characters
allowed. Crossing `{` can not be allowed.
Fixes #67
2015-09-08 12:41:15 +02:00
Matthias Mullie
4a9b888547
Remove empty CSS tags
...
Fixes #67
2015-09-07 21:47:22 +02:00
Matthias Mullie
bdbb91277b
php-cs-fixer
2015-09-05 21:49:18 +02:00
Wouter M. van Vliet
782ea423e4
Add test for fixed issue
2015-09-02 17:33:56 +02:00
Matthias Mullie
7fc36687ec
Strip some more leading & trailing zeroes
2015-08-25 14:56:09 +02:00
Matthias Mullie
3575143b4f
Don't strip all units for 0-values
...
Looks like webkit (especially Safari) doesn't properly handle
0% being 0.
Also had to rewrite some regexes because they should now assume
there may still be a unit.
Fixes issue #60
2015-08-25 14:43:30 +02:00
Matthias Mullie
15e564ff49
Fix relative target path tests
2015-05-13 18:03:46 +02:00
Matthias Mullie
7d68b7da3b
Add tests for multibyte char paths
...
Meanwhile also made it possible to stub a path in the tests, and
stop writing out the minifier result.
2015-05-13 17:43:25 +02:00