cleanup $getIndent
This commit is contained in:
parent
6d7e9e263d
commit
03b9591313
3 changed files with 8 additions and 27 deletions
|
|
@ -60,12 +60,7 @@ var MatchingBraceOutdent = function() {};
|
|||
};
|
||||
|
||||
this.$getIndent = function(line) {
|
||||
var match = line.match(/^(\s+)/);
|
||||
if (match) {
|
||||
return match[1];
|
||||
}
|
||||
|
||||
return "";
|
||||
return line.match(/^\s*/)[0];
|
||||
};
|
||||
|
||||
}).call(MatchingBraceOutdent.prototype);
|
||||
|
|
|
|||
|
|
@ -116,12 +116,7 @@ var Mode = function() {
|
|||
};
|
||||
|
||||
this.$getIndent = function(line) {
|
||||
var match = line.match(/^(\s+)/);
|
||||
if (match) {
|
||||
return match[1];
|
||||
}
|
||||
|
||||
return "";
|
||||
return line.match(/^\s*/)[0];
|
||||
};
|
||||
|
||||
this.createWorker = function(session) {
|
||||
|
|
|
|||
|
|
@ -79,15 +79,6 @@ oop.inherits(Mode, TextMode);
|
|||
doc.replace(new Range(row, 0, row, column-1), indent);
|
||||
};
|
||||
|
||||
this.$getIndent = function(line) {
|
||||
var match = line.match(/^(\s+)/);
|
||||
if (match) {
|
||||
return match[1];
|
||||
}
|
||||
|
||||
return "";
|
||||
};
|
||||
|
||||
this.toggleCommentLines = function(state, doc, startRow, endRow) {
|
||||
var i, line;
|
||||
var outdent = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue