codemirror3, thanks Roberto

This commit is contained in:
mdipierro
2013-06-09 21:43:18 -05:00
parent 4753ebe958
commit ca2fe00933
229 changed files with 33143 additions and 5418 deletions
@@ -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;
});