462 Commits

Author SHA1 Message Date
Matthias Mullie
d84829dd5e Pin scrapbook to a version range
Scrapbook's master has dropped support for PHP<8.0;
we ought to allow other/older versions here, since
we want to be able to continue testing old PHP versions.
2022-11-16 10:08:40 +01:00
Matthias Mullie
23bbe87baa
Update README.md 2022-11-07 15:14:34 +01:00
simondud
a61c949ccc Fix bug #395 Calc function missing on background-position property 1.3.69 2022-08-01 12:00:18 +03:00
simondud
d8993df395 Fix #397 CSS variable value 0px has the px removed and breaks 2022-08-01 08:52:06 +03:00
simondud
49d6bd8356 Fix #383 Problem with a specific file, Choices.js - regex inside ?: conditional 2022-06-06 16:49:20 +03:00
Matthias Mullie
c00fb02f71 Add convenience var for testing only certain paths 1.3.68 2022-04-19 10:28:56 +02:00
Matthias Mullie
7d4542b02c Alternative fix for #393
This keeps whitespace around comments while they're
extracted from the content, and leaves it up to
stripWhitespace later on to strip when appropriate,
ensureing that only the contents of the comment are
preserved or stripped (in stripComments), not the
whitespace around it.
2022-04-19 10:26:37 +02:00
Simon
0c77ac9b43 fix #393, add one more test for the fix of 385 2022-04-17 14:15:19 +03:00
Simon
ab5f4a790b Add test case to reproduce the issue #393 2022-04-16 14:10:39 +03:00
Simon
fd56601c78 Fix the recursive regexes designed to match funcitons inside empty for() blocks matching {} blocks outside them in some circumstances 2022-04-16 14:09:16 +03:00
Simon
b3458006ef Fix issue #394 2022-04-16 12:12:59 +03:00
Matthias Mullie
acaee1b7ca Merge branch 'rowhel95-rowhel95-patch-1' 1.3.67 2022-03-24 09:54:59 +01:00
Matthias Mullie
6fbbb7455a Add test for #378 2022-03-24 09:54:46 +01:00
rowhel95
759f0871f7
Fix minified CSS variable with leading whitespaces
Fixes #378
2022-03-23 17:54:08 +01:00
Simon
dfae0665d7 Fix issue #385 - for(;;) without body but containig closures inside brackets. 2022-03-21 15:55:21 +02:00
Matthias Mullie
37c14b9775 More elaborate GH CI & remove Travis 2022-03-15 22:17:59 +01:00
Matthias Mullie
07f39f07df
Update README.md 2022-03-15 20:35:47 +01:00
Matthias Mullie
bc6093b940
Update test.yml 2022-03-15 20:33:42 +01:00
Matthias Mullie
e8b927b16d Add 8.1 image 2022-03-15 11:15:50 +01:00
Matthias Mullie
5a996031f5 Add GH actions based test runner 2022-03-15 11:15:37 +01:00
Matthias Mullie
33347fbaa1
Update README.md 2022-02-28 14:42:44 +01:00
Matthias Mullie
360d8b0613
Update README.md 2022-02-28 14:41:41 +01:00
Ayumi
0cf6c085b1 Add apng, avif, webp, and woff2 mime types 2021-07-20 13:50:15 +02:00
Roan Kattouw
e3a0356374 Use offsets, reduce string copying to improve performance
Performance improvements in Minify::replace():
- Use offsets when regex matching, instead of substr()ing off the
  processed part of the string
- Perform replacements manually, rather than calling preg_replace() /
  preg_replace_callback() on the entire input string

This dramatically improves performance, especially for inputs with many
things that are replaced at this stage (many strings, comments or
regexes).

The only change noticed by other code is that placeholders like $1 or \2
can no longer be used in Minify::registerPattern(), but no callers were
using this feature anyway, and future callers can use a callback
instead.
2021-01-28 09:01:48 +01:00
Matthias Mullie
7f7aaddec1 Add test to confirm fix for 298
Fixes #298
2021-01-27 14:29:25 +01:00
Matthias Mullie
8538190f4a Speed up multi-line comment preservation regex 2021-01-27 09:50:14 +01:00
setete
6802f36d20 Update FUNDING.yml
File does not support comments in filled in lines, which causes composer to return 
matthiasmullie
  minify
    https://github.com/sponsors/[user1
    https://github.com/sponsors/matthiasmullie] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g.
    https://github.com/sponsors/user2

if fundinginfo is dumped. Removing the comment should resolve the issue.
2021-01-25 15:12:25 +01:00
Matthias Mullie
45fd3b0f1d Make test suite pass for all PHP versions 1.3.66 2021-01-06 16:18:10 +01:00
Matthias Mullie
b88dcc64ec Make sure math methods extraction checks for word boundaries
Otherwise, 'max' could be confused with 'minmax'

Fixes #356
2021-01-06 11:20:44 +01:00
Matthias Mullie
227f190624 Don't install libzip for more recent php versions 1.3.65 2020-12-27 22:43:29 +01:00
Matthias Mullie
6da68a1d6a Add more recent PHP version docker images 2020-12-27 22:08:36 +01:00
Matthias Mullie
6dc3daac84 Login to docker 2020-12-27 21:58:32 +01:00
Matthias Mullie
3e2ab10e2a Add more recent versions to Travis test matrix 2020-12-27 21:50:14 +01:00
Stefan Kalscheuer
3b09a2e01c reverse arguments for implode() call i extractMath()
Fixes regression from 022cd72.
implode() argument order is no longer auto-corrected with PHP 8.
2020-12-27 12:23:53 +01:00
Matthias Mullie
50b8b5daaa
Update README.md 2020-12-23 15:08:17 +01:00
Matthias Mullie
c542a14180
Create FUNDING.yml 2020-12-23 15:06:27 +01:00
Matthias Mullie
38f9d58c73 Add test for #349 1.3.64 2020-12-23 14:37:53 +01:00
Matthias Mullie
022cd72b68 More robust calc() detection
Fixes #312
2020-12-23 14:34:37 +01:00
Matthias Mullie
21678a360c Fix unsafe use of new static
Fixes #350
2020-12-21 15:10:05 +01:00
Matthias Mullie
26da9bbfc8 Preserve custom properties
Fixes #342
2020-12-21 15:08:36 +01:00
Matthias Mullie
8931f76af2 Also preserve math whitespace in clamp, min, max
Fixes #351
2020-12-21 14:15:47 +01:00
Simon
9ba1b45982 Fix #301 calc() not followed by end of line or semicolon not correctly matched 1.3.63 2020-01-21 12:21:08 -08:00
Rémy Perona
a5c9d09f97 add unit test for mutiple calc() on same line 2020-01-21 12:21:08 -08:00
Rémy Perona
a5cf82753b add multiline flag to extractCalcs pattern 2020-01-21 12:21:08 -08:00
enricodias
e99e51935f Add addFile method
The addFile method will throw an exception if it fails to read a file
2020-01-21 12:15:35 -08:00
Wim Wisselink
47a53716f9 Implode swap parameter order for PHP-7.4 support. 1.3.62 2019-12-19 08:54:47 +01:00
Matthias Mullie
e87effb29f Add test for #267 2018-12-17 16:23:25 +01:00
Matthias Mullie
d5acb8ce5b php-cs-fixer 1.3.61 2018-11-27 00:10:39 +01:00
Matthias Mullie
97f118c4c7 Merge branch 'igll-patch-1' 2018-11-27 00:08:46 +01:00
Matthias Mullie
0716502669 Preserve important comments exactly as they are 2018-11-27 00:07:50 +01:00