Open mitsh opened 8 months ago
latest version of the minify js, removes all the datatables script on the step of whiteSpace cleaning.
I track down the script line by line, found the for-loop part that removes all the content.
$content = preg_replace('/(for\((?:[^;\{]*|[^;\{]*function[^;\{]*(\{([^\{\}]*(?-2))*[^\{\}]*\})?[^;\{]*);[^;\{]*;[^;\{]*\));(\}|$)/s', '\\1;;\\4', $content);
I just modified the line to prevent the script being emptied.
$old_content = $content; $content = preg_replace('/(for\((?:[^;\{]*|[^;\{]*function[^;\{]*(\{([^\{\}]*(?-2))*[^\{\}]*\})?[^;\{]*);[^;\{]*;[^;\{]*\));(\}|$)/s', '\\1;;\\4', $content); if (empty($content)) { $content = $old_content; }
latest version of the minify js, removes all the datatables script on the step of whiteSpace cleaning.
I track down the script line by line, found the for-loop part that removes all the content.
I just modified the line to prevent the script being emptied.