50 lines
No EOL
1 KiB
JavaScript
50 lines
No EOL
1 KiB
JavaScript
/**
|
|
* Ajax.org Code Editor (ACE)
|
|
*
|
|
* @copyright 2010, Ajax.org Services B.V.
|
|
* @license LGPLv3 <http://www.gnu.org/licenses/lgpl-3.0.txt>
|
|
* @author Fabian Jakobs <fabian AT ajax DOT org>
|
|
*/
|
|
define(function(require, exports, module) {
|
|
|
|
var Tokenizer = require("../tokenizer");
|
|
var TextHighlightRules = require("./text_highlight_rules");
|
|
|
|
var Text = function() {
|
|
this.$tokenizer = new Tokenizer(new TextHighlightRules().getRules());
|
|
};
|
|
|
|
(function() {
|
|
|
|
this.getTokenizer = function() {
|
|
return this.$tokenizer;
|
|
};
|
|
|
|
this.toggleCommentLines = function(state, doc, range) {
|
|
return 0;
|
|
};
|
|
|
|
this.getNextLineIndent = function(state, line, tab) {
|
|
return "";
|
|
};
|
|
|
|
this.checkOutdent = function(state, line, input) {
|
|
return false;
|
|
};
|
|
|
|
this.autoOutdent = function(state, doc, row) {
|
|
};
|
|
|
|
this.$getIndent = function(line) {
|
|
var match = line.match(/^(\s+)/);
|
|
if (match) {
|
|
return match[1];
|
|
}
|
|
|
|
return "";
|
|
};
|
|
|
|
}).call(Text.prototype);
|
|
|
|
return Text;
|
|
}); |