1
0
Эх сурвалжийг харах

Merge pull request #148 from nathanrreed/roxygen

fix rust raw string highlighting #2086
Henning Dieterichs 4 жил өмнө
parent
commit
7be48826ac
2 өөрчлөгдсөн 16 нэмэгдсэн , 1 устгасан
  1. 15 0
      src/r/r.test.ts
  2. 1 1
      src/r/r.ts

+ 15 - 0
src/r/r.test.ts

@@ -101,6 +101,21 @@ testTokenization('r', [
 			]
 		}
 	],
+	[
+		{
+			line: " #'",
+			tokens: [
+				{ startIndex: 0, type: 'white.r' },
+				{ startIndex: 1, type: 'comment.doc.r' }
+			]			
+		},
+		{
+			line: " ",
+			tokens: [
+				{ startIndex: 0, type: 'white.r' },
+			]
+		}
+	],
 
 	// Strings
 	[

+ 1 - 1
src/r/r.ts

@@ -163,7 +163,7 @@ export const language = <languages.IMonarchLanguage>{
 			[/[{}\[\]()]/, '@brackets'],
 
 			{ include: '@operators' },
-
+			[/#'$/, 'comment.doc'],
 			[/#'/, 'comment.doc', '@roxygen'],
 			[/(^#.*$)/, 'comment'],