@@ -298,6 +298,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
298298 } ,
299299 modeProps : { fold : [ "brace" , "include" ] }
300300 } ) ;
301+
301302 def ( "text/x-java" , {
302303 name : "clike" ,
303304 keywords : words ( "abstract assert boolean break byte case catch char class const continue default " +
@@ -315,6 +316,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
315316 } ,
316317 modeProps : { fold : [ "brace" , "import" ] }
317318 } ) ;
319+
318320 def ( "text/x-csharp" , {
319321 name : "clike" ,
320322 keywords : words ( "abstract as base break case catch checked class const continue" +
@@ -341,6 +343,19 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
341343 }
342344 }
343345 } ) ;
346+
347+ function tokenTripleString ( stream , state ) {
348+ var escaped = false ;
349+ while ( ! stream . eol ( ) ) {
350+ if ( ! escaped && stream . match ( '"""' ) ) {
351+ state . tokenize = null ;
352+ break ;
353+ }
354+ escaped = stream . next ( ) != "\\" && ! escaped ;
355+ }
356+ return "string" ;
357+ }
358+
344359 def ( "text/x-scala" , {
345360 name : "clike" ,
346361 keywords : words (
@@ -366,8 +381,6 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
366381 "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
367382 "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
368383 "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"
369-
370-
371384 ) ,
372385 multiLineStrings : true ,
373386 blockKeywords : words ( "catch class do else finally for forSome if match switch try while" ) ,
@@ -376,9 +389,15 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
376389 "@" : function ( stream ) {
377390 stream . eatWhile ( / [ \w \$ _ ] / ) ;
378391 return "meta" ;
392+ } ,
393+ '"' : function ( stream , state ) {
394+ if ( ! stream . match ( '""' ) ) return false ;
395+ state . tokenize = tokenTripleString ;
396+ return state . tokenize ( stream , state ) ;
379397 }
380398 }
381399 } ) ;
400+
382401 def ( [ "x-shader/x-vertex" , "x-shader/x-fragment" ] , {
383402 name : "clike" ,
384403 keywords : words ( "float int bool void " +
0 commit comments