Open GoogleCodeExporter opened 9 years ago
I think in general the minifiers need to limit lines lengths if it means using
newlines instead of spaces in some cases.
I'll try out that code. Something like this might be fast (incredibly simple
expression + native trim()):
$html = preg_replace_callback('/>([^<]+)</', array('Minify_HTML', '_cbTrim'),
$html);
function _cbTrim($m) {
return '>' . trim($m[1]) . ' <';
}
Original comment by mrclay....@gmail.com
on 13 Aug 2008 at 2:22
Can you try Minify_HTML in R168?
Rather than running 3 patterns on the whole string, there's now one trip across
the
string with two simple patterns.
http://code.google.com/p/minify/source/diff?old=163&r=168&format=unidiff&path=
%2Ftrunk%2Flib%2FMinify%2FHTML.php
I'll consider adding the fallback. But then would these bugs get noticed? ;)
Original comment by mrclay....@gmail.com
on 13 Aug 2008 at 2:15
I've got same bug with long html
During tests I've found that count of mathes is 0 and it do not enter callback
function.
No errors, no notices, no info to help resolve this bug =(
Original comment by swaya...@gmail.com
on 15 Jan 2010 at 8:32
@swaylex: can you tell which is the first preg_replace_callback to fail? Does
your
input have really long lines, or just really long? Ideally attach a failing
HTML file.
Original comment by mrclay....@gmail.com
on 15 Jan 2010 at 9:56
Original issue reported on code.google.com by
ecr...@gmail.com
on 12 Aug 2008 at 2:13