Skip to content
Snippets Groups Projects
Commit e9f801df authored by hahn's avatar hahn
Browse files

task-2494 ... show a warning on |- in config replacement section

parent 25e03025
No related branches found
No related tags found
No related merge requests found
......@@ -169,7 +169,7 @@ class configreplacement {
'method'=>'GET',
));
// HACK: minify YAML of the host ... because it is too large for SPYC parser
// HACK: minify YAML of the host ... because it is too large for SPYC parser?
$sPart="---\n";
$bCopy=false;
foreach(explode("\n", $aData['body']) as $sLine){
......@@ -193,9 +193,16 @@ class configreplacement {
}
// echo 'DEBUG: '.($bCopy ? 'COPY':'SKIP').$sLine.'<br>';
}
if (strstr($sPart, '|-')){
echo 'WARNING: the chars &quot;|-&quot; were found:<br><pre> '
.str_replace('|-', '<span class="replace">|-</span>', $sPart)
.'</pre><br>';
}
require_once __DIR__.'./../../vendor/spyc/spyc.php';
// echo 'DEBUG: <pre>'.print_r(spyc_load($aData['body']), 1).'</pre>';
$aYaml=spyc_load($sPart);
// echo 'DEBUG: <pre>'.print_r($aYaml, 1).'</pre>';
$aReturn=array();
foreach ($aYaml as $aProject){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment