Skip to content

Commit

Permalink
Fix JSON property
Browse files Browse the repository at this point in the history
  • Loading branch information
brendt committed Mar 21, 2024
1 parent 554c5cd commit 986c73c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Languages/Json/Patterns/JsonPropertyPattern.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

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

public function getTokenType(): TokenType
Expand Down
21 changes: 10 additions & 11 deletions tests/test.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
```php
/**
* Takes one array with keys and another with values and combines them
*
* @template TKey
* @template TValue
*
* @param array<mixed, TKey> $arr
* @param array<mixed, TValue> $arr2
* @return array<TKey, TValue>
*/
```json
{
"name": "tempest/highlight",
"description": "Fast, extensible, server-side code highlighting",
"autoload": {
"psr-4": {
"Tempest\\Highlight\\": "src/"
}
}
}
```

0 comments on commit 986c73c

Please sign in to comment.