112 Commits

Author SHA1 Message Date
Matthias Mullie
55cf4ef257 Add test for #214 2017-11-17 17:18:14 +01:00
Matthias Mullie
4a1b464c45 Don't strip ; after empty while loops
Fixes #211
2017-11-17 17:14:13 +01:00
Matthias Mullie
f091f3b9e6 Regexes can also start in array
Fixes #209
2017-10-25 08:48:54 +02:00
Matthias Mullie
abfc7c3bd0 Improve regex detection
Fixed #204
2017-10-13 17:44:30 +02:00
Matthias Mullie
ec3411c298 Add test for #204 2017-09-27 16:40:03 +02:00
Matthias Mullie
134b25a63d Don't confuse comments with regex
Fixed #199
2017-09-15 15:02:11 +02:00
Matthias Mullie
678725d450 Regexes can follow !
Fixes #197
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
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
2017-09-13 15:17:29 +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
2017-07-06 14:26:44 +02:00
Matthias Mullie
09b83e9dbd Don't collapse newlines after 'continue'
Fixes #178
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
Matthias Mullie
b431a11bc5 Add test for #164 2017-04-19 14:47:29 +02:00
Matthias Mullie
da0a6b1261 Add test for #173 2017-04-19 14:42:53 +02:00
Matthias Mullie
a7fc4a98ef Add test for #163 2017-03-16 17:42:50 +01:00
Matthias Mullie
19886d4292 Add test for #164 2017-03-16 17:40:19 +01:00
Matthias Mullie
04fe99d70d Don't shorten and when used as object property
Fixes #167
2017-03-16 17:36:28 +01:00
Matthias Mullie
b48a6d34ff Add jquery-3.1.1 to confirmation tests
Fixes #157
2017-01-26 11:47:38 +01:00
Matthias Mullie
b727c19ad3 Improve ;-deletion after for
Detection of a for-loop was a little shaky (still it,
but better now) and in some cases, a stray ; would be
left untouched.
2017-01-26 11:45:20 +01:00
Matthias Mullie
b473affbb7 php-cs-fixer 2016-11-23 11:16:14 +01:00
Matthias Mullie
101a56354d Restore previous regex extraction method
New code seems to have caused a few other issues, and the reason
for having changed it doesn't apply anymore (fixed elsewhere
already), so might as well restore this one :)

Fixes #146
2016-11-11 21:29:29 +01:00
Matthias Mullie
288b7c007e Alternative regex matching
Fixes #146
2016-11-10 17:01:10 +01:00
Matthias Mullie
9bcf6e2d36 Fix ASI regex extraction
Fixes #143
2016-11-10 11:04:50 +01:00
Matthias Mullie
7dd8d25fdb Improve regex detection
Fixes issue #142
2016-11-10 10:09:50 +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
de4bcf23b6 php-cs-fixer 2016-10-13 13:49:22 +02:00
Matthias Mullie
099f5ec75d Fix passing array as argument to add
There were some issues with the interplay between an array
being passed, and the method being overloaded. Individually,
both would work, but when they're combined, it would fail.
2016-10-13 13:45:01 +02: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
5bd843c5a4 Regex can also be followed by .
Fixes #138
2016-10-13 13:27:31 +02:00
Matthias Mullie
64f7d8a83b Add test for issue #136 2016-09-14 17:07:23 +02:00
Matthias Mullie
52139dad41 Add test for issue #136 2016-09-14 13:31:25 +02:00
Matthias Mullie
f03da3f743 Don't shorten bools if they're object literal keys
Fixes issue #134
2016-09-14 13:27:15 +02:00
Matthias Mullie
9e0dfaf1b1 Only strip whitespace after other operations
Property notation, for example, alters the content. If we've stripped
whitespace first, the transformations in propertynotation may no
longer be correct.

Fixed issue #133
2016-09-14 13:22:15 +02:00
Matthias Mullie
97a8f64bab Improve whitespace stripping around certain operators
1: some were not stripped agressively enough. E.g.:
   return !0 -> return!0
2: some were stripped too aggressive. E.g.:
   func()
   {1+2}
   Should not be joined on 1 line, since func() could be a function
   call and {1+2} an unrelated piece of code

Fixes issue #130
2016-09-14 13:13:59 +02:00
Matthias Mullie
d63980b5cf Regular expressions can also be followed by }
Fixes issue #124
2016-09-14 11:51:12 +02:00
Matthias Mullie
ac88354d6d Simplify regex & add test case for issue 120 2016-09-14 10:41:50 +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
dcdedb0389 Improve regex extraction
Fixes issue #115
2016-06-09 21:04:46 +02:00
Matthias Mullie
2552412426 Also don't fork if it's simply not available 2016-06-09 19:01:25 +02:00
Matthias Mullie
8f76616c40 Don't run fork test on HHVM 2016-06-09 18:05:40 +02:00
Matthias Mullie
75eff20d29 Suppress is_file errors, which may be caused by open_basedir
Fixes issue #111
2016-06-09 17:53:59 +02:00
Matthias Mullie
9c9c286776 Add tests for issue #108 2016-04-27 13:12:17 +02:00
Matthias Mullie
42bcd8c16e Add tests for issue #102 2016-04-27 12:49:27 +02:00
Matthias Mullie
8fa45a1be0 Add test for issue #100 2016-04-27 12:40:09 +02:00
Matthias Mullie
272e461134 Fix '0' being replaces by first string's value
Fixes #99
2016-03-01 09:00:27 +01: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