diff --git a/src/DocBlock/DescriptionFactory.php b/src/DocBlock/DescriptionFactory.php index e7bc616d..6915c16f 100644 --- a/src/DocBlock/DescriptionFactory.php +++ b/src/DocBlock/DescriptionFactory.php @@ -100,8 +100,9 @@ private function lex(string $contents): array return Utils::pregSplit( '/\{ - # "{@}" is not a valid inline tag. This ensures that we do not treat it as one, but treat it literally. - (?!@\}) + # "{@}" and "{@*}" are not a valid inline tags. This ensures that we do not treat them as one, but treat + # them literally. + (?!(?:@\}|@\*\}) ) # We want to capture the whole tag line, but without the inline tag delimiters. (\@ # Match everything up to the next delimiter. diff --git a/tests/unit/DocBlock/DescriptionFactoryTest.php b/tests/unit/DocBlock/DescriptionFactoryTest.php index 00304cad..6b087ee9 100644 --- a/tests/unit/DocBlock/DescriptionFactoryTest.php +++ b/tests/unit/DocBlock/DescriptionFactoryTest.php @@ -245,6 +245,7 @@ public function provideEscapeSequences(): array { return [ ['This is text for a description with a {@}.', 'This is text for a description with a @.'], + ['This is text for a description with a {@*}.', 'This is text for a description with a {@*}.'], ['This is text for a description with a {}.', 'This is text for a description with a }.'], ]; }