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
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
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.
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
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
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.
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.
Notes:
PHP's fwrite only returns false if you call this function with an invalid argument. If any other error occurs it will return the number of bytes that has been written. So we have to add another check.
- 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.
- Fix JSTest data for cross-system compatibility;
- Update test-case for https://github.com/matthiasmullie/minify/issues/56 and perform fixes;
- Some code simplifications, remove some code duplicates;
- Ignore test samples for convenience of running tests;
- Update readme.