From e174b96db8ce544435940083593637175a0ce954 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 4 Mar 2019 12:44:03 +0100 Subject: [PATCH] Fixes Microsoft/monaco-editor#1213 --- src/php/php.test.ts | 18 ++++++++++++++++++ src/php/php.ts | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/php/php.test.ts b/src/php/php.test.ts index 38f6cdd1..707fb76b 100644 --- a/src/php/php.test.ts +++ b/src/php/php.test.ts @@ -2076,5 +2076,23 @@ testTokenization(['php', 'css', 'javascript'], [ { startIndex: 17, type: '' }, { startIndex: 18, type: 'metatag.php' } ] + }], + + [{ + line: '{ [/[ \t\r\n]+/], // comments - [/#/, 'comment.php', '@phpLineComment'], - [/\/\//, 'comment.php', '@phpLineComment'], + [/(#|\/\/)$/, 'comment.php'], + [/(#|\/\/)/, 'comment.php', '@phpLineComment'], // block comments [/\/\*/, 'comment.php', '@phpComment'],