@@ -1243,10 +1243,10 @@ private function cleanUpClangOutput ($clang_output, $compiler_config, $option) {
1243
1243
1244
1244
private function pathRemover ($ output , $ compiler_config ) {
1245
1245
1246
- $ core_pattern = "/ " . str_replace ("/ " , "\\/ " , $ compiler_config ["arduino_cores_dir " ]) . "([.* \\S]* \\/) " . "/ " ;
1247
- $ external_core_pattern = "// " ;
1248
- if (isset ($ compiler_config ["external_core_files " ]) && $ compiler_config ["external_core_files " ] != "" )
1249
- $ external_core_pattern = "/ " . str_replace ("/ " , "\\/ " , $ compiler_config ["external_core_files " ]) . "([.* \\S]* \\/) " . "/ " ;
1246
+ // $core_pattern = "/" . str_replace("/", "\\/", $compiler_config["arduino_cores_dir"]) . "([.*\\S]*\\/)" . "/";
1247
+ // $external_core_pattern = "//";
1248
+ // if (isset($compiler_config["external_core_files"]) && $compiler_config["external_core_files"] != "")
1249
+ // $external_core_pattern = "/" . str_replace("/", "\\/", $compiler_config["external_core_files"]) . "([.*\\S]*\\/)" . "/";
1250
1250
1251
1251
// Remove any instance of "compiler.RANDOM/files/" folder name from the text
1252
1252
$ modified = str_replace ($ compiler_config ["compiler_dir " ] . "/files/ " , '' , $ output );
@@ -1255,10 +1255,13 @@ private function pathRemover ($output, $compiler_config) {
1255
1255
$ modified = str_replace ($ compiler_config ["compiler_dir " ] . "/ " , '' , $ modified );
1256
1256
1257
1257
// Remove any instance of codebender arduino core files folder name from the text
1258
- $ modified = preg_replace ($ core_pattern , '' , $ modified );
1258
+ // $modified = preg_replace($core_pattern, '', $modified);
1259
+ $ modified = preg_replace ($ compiler_config ["arduino_cores_dir " ], '' , $ modified );
1259
1260
1260
1261
// Remove any instance of codebender external core file folder name from the text
1261
- $ modified = preg_replace ($ external_core_pattern , '' , $ modified );
1262
+ // $modified = preg_replace($external_core_pattern, '', $modified);
1263
+ if (isset ($ compiler_config ["external_core_files " ]) && $ compiler_config ["external_core_files " ] != "" )
1264
+ $ modified = preg_replace ($ compiler_config ["external_core_files " ], '' , $ modified );
1262
1265
1263
1266
return $ modified ;
1264
1267
}
0 commit comments