Fix description parser to skip banner lines; shrink cron input width

This commit is contained in:
Gmer4Lfe
2026-05-23 18:14:42 -04:00
parent 065b29fcc8
commit 24d8697858
2 changed files with 5 additions and 6 deletions
@@ -44,8 +44,8 @@
.vv-job-desc { font-size: 12px; color: #555; margin: 2px 0 6px 44px;
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
cursor: default; }
.vv-cron { width: 140px; flex-shrink: 0; background: #111; border: 1px solid #444; color: #ddd;
padding: 4px 8px; border-radius: 4px; font-family: monospace; font-size: 13px; }
.vv-cron { width: 13ch; flex-shrink: 0; background: #111; border: 1px solid #444; color: #ddd;
padding: 4px 6px; border-radius: 4px; font-family: monospace; font-size: 13px; }
.vv-children { padding-top: 8px; border-top: 1px solid #333; margin-top: 8px; }
.vv-advanced-toggle { background: none; border: 1px solid #555; color: #aaa;
padding: 2px 8px; border-radius: 4px; cursor: pointer; font-size: 12px; }
@@ -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;