codemirror3, thanks Roberto
This commit is contained in:
@@ -158,7 +158,7 @@ CodeMirror.defineMode('coffeescript', function(conf) {
|
||||
if (stream.match(identifiers)) {
|
||||
return 'variable';
|
||||
}
|
||||
|
||||
|
||||
if (stream.match(properties)) {
|
||||
return 'property';
|
||||
}
|
||||
@@ -170,7 +170,7 @@ CodeMirror.defineMode('coffeescript', function(conf) {
|
||||
|
||||
function tokenFactory(delimiter, outclass) {
|
||||
var singleline = delimiter.length == 1;
|
||||
return function tokenString(stream, state) {
|
||||
return function(stream, state) {
|
||||
while (!stream.eol()) {
|
||||
stream.eatWhile(/[^'"\/\\]/);
|
||||
if (stream.eat('\\')) {
|
||||
@@ -331,14 +331,15 @@ CodeMirror.defineMode('coffeescript', function(conf) {
|
||||
return style;
|
||||
},
|
||||
|
||||
indent: function(state, textAfter) {
|
||||
indent: function(state) {
|
||||
if (state.tokenize != tokenBase) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return state.scopes[0].offset;
|
||||
}
|
||||
},
|
||||
|
||||
lineComment: "#"
|
||||
};
|
||||
return external;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user