Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/DocBlock/DescriptionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions tests/unit/DocBlock/DescriptionFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 }.'],
];
}
Expand Down