Fix description parser to skip banner lines; shrink cron input width
This commit is contained in:
@@ -73,10 +73,9 @@ function vv_script_description(string $path): string {
|
||||
if (str_starts_with($raw, '#!')) continue; // shebang
|
||||
if (!str_starts_with($raw, '#')) continue; // non-comment
|
||||
$inner = ltrim(substr($raw, 1)); // strip leading #
|
||||
if (preg_match('/^[\s=\-─━\*]+$/', $inner) || $inner === '') { // separator / blank
|
||||
if ($purposeNext) continue;
|
||||
continue;
|
||||
}
|
||||
if ($inner === '') continue; // blank
|
||||
if (preg_match('/^[\s=\-─━\*]+$/', $inner)) continue; // pure separator
|
||||
if (preg_match('/^={3,}/', $inner)) continue; // banner (=== Title ===)
|
||||
if (preg_match('/^\s*(PURPOSE|DESCRIPTION|Description)\s*$/i', $inner)) {
|
||||
$purposeNext = true;
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user