File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ private function generateRegexp(): string
146146
147147 self ::TOKEN_OPEN_PHPDOC => '/ \\* \\*(?= \\s) \\x20?+ ' ,
148148 self ::TOKEN_CLOSE_PHPDOC => '\\*/ ' ,
149- self ::TOKEN_PHPDOC_TAG => '@[a-z][a-z0-9-]*+ ' ,
149+ self ::TOKEN_PHPDOC_TAG => '@[a-z][a-z0-9- \\\\ ]*+ ' ,
150150 self ::TOKEN_PHPDOC_EOL => '\\r?+ \\n[ \\x09 \\x20]*+(?: \\*(?!/) \\x20?+)? ' ,
151151
152152 self ::TOKEN_FLOAT => '(?:-?[0-9]++ \\.[0-9]*+(?:e-?[0-9]++)?)|(?:-?[0-9]*+ \\.[0-9]++(?:e-?[0-9]++)?)|(?:-?[0-9]++e-?[0-9]++) ' ,
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ protected function setUp(): void
8989 * @dataProvider provideAssertTagsData
9090 * @dataProvider provideRealWorldExampleData
9191 * @dataProvider provideDescriptionWithOrWithoutHtml
92+ * @dataProvider provideTagsWithBackslash
9293 */
9394 public function testParse (
9495 string $ label ,
@@ -4459,6 +4460,20 @@ public function provideTagsWithNumbers(): Iterator
44594460 ];
44604461 }
44614462
4463+ public function provideTagsWithBackslash (): Iterator
4464+ {
4465+ yield [
4466+ 'OK without description and tag with backslash in it ' ,
4467+ '/** @ORM\Mapping\Entity User */ ' ,
4468+ new PhpDocNode ([
4469+ new PhpDocTagNode (
4470+ '@ORM\Mapping\Entity ' ,
4471+ new GenericTagValueNode ('User ' )
4472+ ),
4473+ ]),
4474+ ];
4475+ }
4476+
44624477 /**
44634478 * @dataProvider dataParseTagValue
44644479 * @param PhpDocNode $expectedPhpDocNode
You can’t perform that action at this time.
0 commit comments