Fix description parser to skip banner lines; shrink cron input width
This commit is contained in:
@@ -44,8 +44,8 @@
|
|||||||
.vv-job-desc { font-size: 12px; color: #555; margin: 2px 0 6px 44px;
|
.vv-job-desc { font-size: 12px; color: #555; margin: 2px 0 6px 44px;
|
||||||
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
||||||
cursor: default; }
|
cursor: default; }
|
||||||
.vv-cron { width: 140px; flex-shrink: 0; background: #111; border: 1px solid #444; color: #ddd;
|
.vv-cron { width: 13ch; flex-shrink: 0; background: #111; border: 1px solid #444; color: #ddd;
|
||||||
padding: 4px 8px; border-radius: 4px; font-family: monospace; font-size: 13px; }
|
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-children { padding-top: 8px; border-top: 1px solid #333; margin-top: 8px; }
|
||||||
.vv-advanced-toggle { background: none; border: 1px solid #555; color: #aaa;
|
.vv-advanced-toggle { background: none; border: 1px solid #555; color: #aaa;
|
||||||
padding: 2px 8px; border-radius: 4px; cursor: pointer; font-size: 12px; }
|
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; // shebang
|
||||||
if (!str_starts_with($raw, '#')) continue; // non-comment
|
if (!str_starts_with($raw, '#')) continue; // non-comment
|
||||||
$inner = ltrim(substr($raw, 1)); // strip leading #
|
$inner = ltrim(substr($raw, 1)); // strip leading #
|
||||||
if (preg_match('/^[\s=\-─━\*]+$/', $inner) || $inner === '') { // separator / blank
|
if ($inner === '') continue; // blank
|
||||||
if ($purposeNext) continue;
|
if (preg_match('/^[\s=\-─━\*]+$/', $inner)) continue; // pure separator
|
||||||
continue;
|
if (preg_match('/^={3,}/', $inner)) continue; // banner (=== Title ===)
|
||||||
}
|
|
||||||
if (preg_match('/^\s*(PURPOSE|DESCRIPTION|Description)\s*$/i', $inner)) {
|
if (preg_match('/^\s*(PURPOSE|DESCRIPTION|Description)\s*$/i', $inner)) {
|
||||||
$purposeNext = true;
|
$purposeNext = true;
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user