Commit 8ac78126 authored by jonnybradley's avatar jonnybradley

[FIX] minify: Temporary workaround for 2 codemirror mode files that fail to...

[FIX] minify: Temporary workaround for 2 codemirror mode files that fail to minify in v 5.19.0 (issue has been reported to codemirror)
parent 736c45f0
......@@ -32,7 +32,15 @@ test = { mode: function () {}, indentation: function() {} }
foreach (glob('vendor/codemirror/codemirror/mode/*', GLOB_ONLYDIR) as $dir) {
foreach (glob($dir.'/*.js', GLOB_NOCHECK) as $jsFile) {
if(is_file($jsFile)){
if(
is_file($jsFile) && (
$prefs['tiki_minify_javascript'] !== 'y' ||
(
strpos($jsFile, 'powershell.js') === false // FIXME temporary workaound for errors in codemirror 5.19.0
&& strpos($jsFile, 'swift.js') === false // FIXME temporary workaound for errors in codemirror 5.19.0
)
)
){
$js .= "//" . $jsFile . "\n";
$js .= "try {\n" . @file_get_contents($jsFile) . "\n} catch (e) { };\n";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment