Skip to content

Commit

Permalink
Fix html property with dash
Browse files Browse the repository at this point in the history
  • Loading branch information
tito10047 committed Mar 24, 2024
1 parent d108d8a commit 71e2a93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Languages/Xml/Patterns/XmlAttributePattern.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@

#[PatternTest(input: '<x-hello attr="">', output: 'attr')]
#[PatternTest(input: '<a href="">', output: 'href')]
#[PatternTest(input: '<a data-type="">', output: 'data-type')]
final readonly class XmlAttributePattern implements Pattern
{
use IsPattern;

public function getPattern(): string
{
return '(?<match>[\w]+)="';
return '(?<match>[\w\-]+)="';
}

public function getTokenType(): TokenType
Expand Down

0 comments on commit 71e2a93

Please sign in to comment.