Update buildreadme.php
This commit is contained in:
parent
fc95d59825
commit
f22dba64c5
|
@ -19,17 +19,19 @@ $poems=$matches[1];
|
|||
$endB="";
|
||||
$f=file("README.md");
|
||||
$writeStuff=true;
|
||||
$i=1;
|
||||
foreach($f as $line){
|
||||
if(trim($line)=="<!-- BEGIN POEMLIST -->"){
|
||||
$writeStuff=false;
|
||||
$endB.=$line;
|
||||
foreach($poems as $p) $endB.="* ".$p."\n";
|
||||
foreach($poems as $p) $endB.="* $i ".$p."\n";
|
||||
}
|
||||
if($writeStuff) $endB.=$line;
|
||||
if(trim($line)=="<!-- END POEMLIST -->"){
|
||||
$endB.=$line;
|
||||
$writeStuff=true;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
file_put_contents("README.md",$endB);
|
||||
|
|
Loading…
Reference in New Issue
Block a user