519 Commits

Author SHA1 Message Date
Matthias Mullie
023c6bfb19 Ignore unescaped / inside []
Fixes #221
2018-01-01 15:27:09 +01:00
Matthias Mullie
a85f804092 Regex can follow +,-,*,/
Fixes #221
2018-01-01 15:25:15 +01:00
Matthias Mullie
f2f48a90f0 Add support url 2017-12-13 16:58:45 +01:00
Matthias Mullie
7559ac0806 Add 7.2 to build matrix 1.3.57 2017-12-06 13:46:42 +01:00
Matthias Mullie
abc21b31f7 Add support for building multiple PHP versions on docker 2017-12-06 13:46:33 +01:00
Matthias Mullie
d39132a3be Fix PHP<7 segfault 2017-12-06 13:42:29 +01:00
Matthias Mullie
a370e29897 Add test case for semicolon after do-while 2017-12-06 12:28:58 +01:00
Matthias Mullie
a2024cc406 Strip whitespace after in some cases 2017-12-06 12:21:49 +01:00
Matthias Mullie
f231fbc701 Improve regex detection
The regex to detect regexes is better now, and as a result
I can now take out a bunch of workarounds that were needed
with the earlier flawed regex detection.

Fixes #218
2017-12-06 12:21:18 +01:00
Matthias Mullie
86e4a4e4e7 Leave calc expressions alone when stripping units off of 0
Fixed #217
1.3.56
2017-11-24 13:51:16 +01:00
Matthias Mullie
2550f2d533 Add test for #216 2017-11-19 16:58:30 +01:00
Matthias Mullie
82970e60e7 Remove pointless var 2017-11-18 22:58:37 +01:00
Matthias Mullie
16563a8bc7 Improve detection of @imports to move to top
Fixes #215
2017-11-17 18:52:43 +01:00
Matthias Mullie
55cf4ef257 Add test for #214 2017-11-17 17:18:14 +01:00
Matthias Mullie
691f0cfe87 Add tests for #212 2017-11-17 17:16:01 +01:00
Matthias Mullie
4a1b464c45 Don't strip ; after empty while loops
Fixes #211
2017-11-17 17:14:13 +01:00
Matthias Mullie
a9956302b3 Properly strip consecutive empty CSS blocks
Fixes #210
2017-11-17 16:25:17 +01:00
Matthias Mullie
21084eb9e6 Fix PHP5.3 compatibility
Yet another ugly workaround...
Fixes #208
1.3.55
2017-10-25 13:13:12 +02:00
Matthias Mullie
5d079794e0 Fix PHP5.3 compatibility
Another ugly workaround...
Fixes #208
2017-10-25 11:45:44 +02:00
Matthias Mullie
73d5304c5c Fix PHP5.3 compatibility
Ah, those ugly workarounds...
Fixes #208
2017-10-25 09:57:06 +02:00
Matthias Mullie
f091f3b9e6 Regexes can also start in array
Fixes #209
1.3.54
2017-10-25 08:48:54 +02:00
Matthias Mullie
30c874c8a7 Fix PHP5.3-incompatible construct
Fixes #208
2017-10-25 08:48:54 +02:00
gkrafsig
7106660a91 fixing invalid [optional] text 2017-10-17 09:00:46 +02:00
gkrafsig
7f79958765 Fixing phpdocumentor errors 2017-10-17 09:00:46 +02:00
Matthias Mullie
7d79f1188e Use docker-compose for faster volume switching 1.3.53 2017-10-13 17:44:30 +02:00
Matthias Mullie
abfc7c3bd0 Improve regex detection
Fixed #204
2017-10-13 17:44:30 +02:00
Matthias Mullie
2ae8e76178 Remove a few things for regex matches
I misread - these can not follow a regex
2017-10-13 17:44:30 +02:00
Matthias Mullie
1abaef9700 Add another link to minifier.org 2017-10-12 08:53:08 +02:00
Matthias Mullie
ec3411c298 Add test for #204 2017-09-27 16:40:03 +02:00
Matthias Mullie
08e6638e23 Add better description & up php-cs-fixer version 2017-09-26 17:29:20 +02:00
Matthias Mullie
c2f929c3d9 Add docker helpers to makefile 2017-09-21 19:12:16 +02:00
Matthias Mullie
11a1520dbb Fix Appveyor builds 2017-09-21 15:13:41 +02:00
Matthias Mullie
fa0b1d4375 Add Dockerfile for quick and easy testing
Not that it's hard to set up an environment to test
this library in, but perhaps you just can't be bothered
to mess up your system installing software and versions
you don't otherwise need.

Build the image:
$ docker build -t minify .

Run the tests:
$ docker run --rm --name minify minify

Or if you plan on testing/changing the code and don't
want to rebuild the image, just load it as a volume:
$ docker run --rm --name minify -v ~/Sites/minify:/var/www minify
2017-09-21 14:08:21 +02:00
Matthias Mullie
358a273f60 Show some of the minify features 2017-09-19 15:52:48 +02:00
Matthias Mullie
134b25a63d Don't confuse comments with regex
Fixed #199
1.3.52
2017-09-15 15:02:11 +02:00
Matthias Mullie
678725d450 Regexes can follow !
Fixes #197
1.3.51
2017-09-14 14:37:17 +02:00
Matthias Mullie
e13f94adf0 Require that a regex has some content
Otherwise, the `//` that start a comment could be misread
as regexes.

Fixes #196
1.3.50
2017-09-13 18:51:16 +02:00
Matthias Mullie
0913101507 Add test for #195 2017-09-13 18:14:48 +02:00
Matthias Mullie
ff4ec668b3 Improve regex detection
Fixes #195
1.3.49
2017-09-13 15:17:29 +02:00
Matthias Mullie
6e9d575596 Allow = inside regexes
A fix for something else introduced a potential issue that when
regular expressions have a `=` inside them, they wouldn't be
recognized as such.

This should make the regex detection more robust by checking
the surrounding code, instead of limiting what can be inside.
1.3.48
2017-09-13 09:31:06 +02:00
Matthias Mullie
69f3d7ba83 Quote url() uri's with quotes in them
Fixes #193
1.3.47
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
7bb172c8fc Add test for #190 2017-09-07 18:54:52 +02:00
Matthias Mullie
574c4eef3a Add test for #189 2017-09-07 18:30:01 +02:00
Matthias Mullie
6754968497 Improve regex detection
Fixes #186
2017-09-07 18:21:26 +02:00
Matthias Mullie
1443646268 Fix newline trimming around tilde
Fixed #185
1.3.46
2017-07-06 14:26:44 +02:00
Matthias Mullie
0bb72d8eba Fix docs 2017-07-06 13:48:45 +02:00
Matthias Mullie
0b3f4f7a26 Add tests for #184 2017-07-06 13:48:28 +02:00
Matthias Mullie
09b83e9dbd Don't collapse newlines after 'continue'
Fixes #178
1.3.45
2017-06-13 17:54:31 +02:00
Matthias Mullie
563651cf1b Fix regex detection when content is only backslashes
Fixes #182
2017-06-13 17:45:38 +02:00