فهرست منبع

Fixes microsoft/monaco-editor#2424: Escape consecutive @@

Alex Dima 4 سال پیش
والد
کامیت
d78c032a75
4فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 1 1
      src/julia/julia.ts
  2. 1 1
      src/razor/razor.ts
  3. 2 2
      src/ruby/ruby.ts
  4. 1 1
      src/swift/swift.ts

+ 1 - 1
src/julia/julia.ts

@@ -404,7 +404,7 @@ export const language = <languages.IMonarchLanguage>{
 			[/\$\w+/, 'key'],
 			[/\$\(/, 'key', '@paste'],
 
-			[/@@ident/, 'annotation'],
+			[/@@@ident/, 'annotation'],
 
 			// whitespace
 			{ include: '@whitespace' },

+ 1 - 1
src/razor/razor.ts

@@ -81,7 +81,7 @@ export const language = <languages.IMonarchLanguage>{
 	// The main tokenizer for our languages
 	tokenizer: {
 		root: [
-			[/@@/], // text
+			[/@@@@/], // text
 			[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.root' }],
 			[/<!DOCTYPE/, 'metatag.html', '@doctype'],
 			[/<!--/, 'comment.html', '@comment'],

+ 2 - 2
src/ruby/ruby.ts

@@ -282,7 +282,7 @@ export const language = <languages.IMonarchLanguage>{
 			[/[A-Z][\w]*[!?=]?/, 'constructor.identifier'], // constant
 			[/\$[\w]*/, 'global.constant'], // global
 			[/@[\w]*/, 'namespace.instance.identifier'], // instance
-			[/@@[\w]*/, 'namespace.class.identifier'], // class
+			[/@@@[\w]*/, 'namespace.class.identifier'], // class
 
 			// here document
 			[/<<[-~](@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
@@ -444,7 +444,7 @@ export const language = <languages.IMonarchLanguage>{
 		interpolated: [
 			[/\$\w*/, 'global.constant', '@pop'],
 			[/@\w*/, 'namespace.class.identifier', '@pop'],
-			[/@@\w*/, 'namespace.instance.identifier', '@pop'],
+			[/@@@\w*/, 'namespace.instance.identifier', '@pop'],
 			[
 				/[{]/,
 				{

+ 1 - 1
src/swift/swift.ts

@@ -200,7 +200,7 @@ export const language = <languages.IMonarchLanguage>{
 
 		attribute: [
 			[
-				/\@@identifier/,
+				/@@@identifier/,
 				{
 					cases: {
 						'@attributes': 'keyword.control',