| 1 |
ace.define("ace/mode/gitignore_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; |
| 2 |
var oop = require("../lib/oop"); |
| 3 |
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; |
| 4 |
var GitignoreHighlightRules = function () { |
| 5 |
this.$rules = { |
| 6 |
"start": [ |
| 7 |
{ |
| 8 |
token: "comment", |
| 9 |
regex: /^\s*#.*$/ |
| 10 |
}, { |
| 11 |
token: "keyword", |
| 12 |
regex: /^\s*!.*$/ |
| 13 |
} |
| 14 |
] |
| 15 |
}; |
| 16 |
this.normalizeRules(); |
| 17 |
}; |
| 18 |
GitignoreHighlightRules.metaData = { |
| 19 |
fileTypes: ['gitignore'], |
| 20 |
name: 'Gitignore' |
| 21 |
}; |
| 22 |
oop.inherits(GitignoreHighlightRules, TextHighlightRules); |
| 23 |
exports.GitignoreHighlightRules = GitignoreHighlightRules; |
| 24 |
|
| 25 |
}); |
| 26 |
|
| 27 |
ace.define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"], function(require, exports, module){"use strict"; |
| 28 |
var oop = require("../lib/oop"); |
| 29 |
var TextMode = require("./text").Mode; |
| 30 |
var GitignoreHighlightRules = require("./gitignore_highlight_rules").GitignoreHighlightRules; |
| 31 |
var Mode = function () { |
| 32 |
this.HighlightRules = GitignoreHighlightRules; |
| 33 |
this.$behaviour = this.$defaultBehaviour; |
| 34 |
}; |
| 35 |
oop.inherits(Mode, TextMode); |
| 36 |
(function () { |
| 37 |
this.lineCommentStart = "#"; |
| 38 |
this.$id = "ace/mode/gitignore"; |
| 39 |
}).call(Mode.prototype); |
| 40 |
exports.Mode = Mode; |
| 41 |
|
| 42 |
}); (function() { |
| 43 |
ace.require(["ace/mode/gitignore"], function(m) { |
| 44 |
if (typeof module == "object" && typeof exports == "object" && module) { |
| 45 |
module.exports = m; |
| 46 |
} |
| 47 |
}); |
| 48 |
})(); |
| 49 |
|