Skip to content

Commit fa3bc4e

Browse files
committed
fix bug missing content
1 parent cc81c3e commit fa3bc4e

File tree

4 files changed

+136
-100
lines changed

4 files changed

+136
-100
lines changed

src/Functional.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
declare(strict_types=1);
3+
namespace Xentral\LaravelDocs;
4+
5+
#[\Attribute(\Attribute::TARGET_CLASS)]
6+
class Functional
7+
{
8+
public function __construct(
9+
public string $nav,
10+
public string $text,
11+
public array $uses = [],
12+
public array $links = [],
13+
)
14+
{
15+
}
16+
}

src/FunctionalDocBlockExtractor.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,24 @@ private function parseDocComment(string $docComment, string $defaultTitle, strin
147147
if ($inFunctionalBlock) {
148148
// Check if this line contains an annotation (even if it's in a bullet list)
149149
$trimmedTest = ltrim(trim((string) $testLine), '* -');
150-
if (str_starts_with(trim($trimmedTest), '@')) {
150+
$cleanAnnotation = trim($trimmedTest);
151+
152+
// Skip known metadata annotations (they're extracted in Pass 1)
153+
if (str_starts_with($cleanAnnotation, '@nav ') ||
154+
str_starts_with($cleanAnnotation, '@navid ') ||
155+
str_starts_with($cleanAnnotation, '@navparent ') ||
156+
str_starts_with($cleanAnnotation, '@uses ') ||
157+
str_starts_with($cleanAnnotation, '@uses\\')||
158+
str_starts_with($cleanAnnotation, '@link ') ||
159+
str_starts_with($cleanAnnotation, '@links ')) {
160+
continue; // Skip but don't break
161+
}
162+
163+
// Break on any other annotation (marks end of functional block)
164+
if (str_starts_with($cleanAnnotation, '@')) {
151165
break;
152166
}
167+
153168
$rawFunctionalLines[] = $testLine;
154169
}
155170
}

0 commit comments

Comments
 (0)