Browse Source

Allow the 's' flag in regular expressions

Sebastian Pahnke 6 năm trước cách đây
mục cha
commit
3e6c3ee653
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/typescript/typescript.ts

+ 1 - 1
src/typescript/typescript.ts

@@ -130,7 +130,7 @@ export const language = {
 			{ include: '@whitespace' },
 
 			// regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
-			[/\/(?=([^\\\/]|\\.)+\/([gimuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/, { token: 'regexp', bracket: '@open', next: '@regexp' }],
+			[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/, { token: 'regexp', bracket: '@open', next: '@regexp' }],
 
 			// delimiters and operators
 			[/[()\[\]]/, '@brackets'],