diff --git a/src/Languages/Json/Patterns/JsonPropertyPattern.php b/src/Languages/Json/Patterns/JsonPropertyPattern.php index f8e5bc9..1033d8d 100644 --- a/src/Languages/Json/Patterns/JsonPropertyPattern.php +++ b/src/Languages/Json/Patterns/JsonPropertyPattern.php @@ -16,7 +16,7 @@ public function getPattern(): string { - return '(?\"[\w-]+\")(\s)*\:'; + return '(?\"[\w\\\-]+\")(\s)*\:'; } public function getTokenType(): TokenType diff --git a/tests/test.md b/tests/test.md index b87c8f9..d12a90e 100644 --- a/tests/test.md +++ b/tests/test.md @@ -1,12 +1,11 @@ -```php -/** - * Takes one array with keys and another with values and combines them - * - * @template TKey - * @template TValue - * - * @param array $arr - * @param array $arr2 - * @return array - */ +```json +{ + "name": "tempest/highlight", + "description": "Fast, extensible, server-side code highlighting", + "autoload": { + "psr-4": { + "Tempest\\Highlight\\": "src/" + } + } +} ``` \ No newline at end of file