mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-22 03:07:58 +00:00
35 lines
685 B
PHP
35 lines
685 B
PHP
<?php
|
|
|
|
function print_usage()
|
|
{
|
|
fwrite(STDERR,
|
|
"USAGE:\n"
|
|
. " php check__issue_references.php mdfile\n"
|
|
);
|
|
}
|
|
|
|
if ($argc < 2) {
|
|
fwrite(STDERR, "Invalid arguments:\n");
|
|
print_usage();
|
|
exit(1);
|
|
}
|
|
|
|
$mdfile = $argv[1];
|
|
|
|
$data = file_get_contents($mdfile);
|
|
|
|
if(preg_match_all('/\[([^\]]+)\][^(:]/', $data."\n",$m))
|
|
{
|
|
$references = $m[1];
|
|
foreach($references as $r)
|
|
{
|
|
if(!preg_match("/\[".preg_quote($r,"/")."\]:(.*)/", $data,$m2)){
|
|
if(preg_match('/^#[0-9]+$/', $r)){
|
|
$issuenum = substr($r,1);
|
|
echo "[$r]: https://www.free-decompiler.com/flash/issues/$issuenum\n";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|