4b99ec9b42e080ec2d769ea4971ea76c.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. 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";
  26. var oop = require("../lib/oop");
  27. var TextMode = require("./text").Mode;
  28. var GitignoreHighlightRules = require("./gitignore_highlight_rules").GitignoreHighlightRules;
  29. var Mode = function () {
  30. this.HighlightRules = GitignoreHighlightRules;
  31. this.$behaviour = this.$defaultBehaviour;
  32. };
  33. oop.inherits(Mode, TextMode);
  34. (function () {
  35. this.lineCommentStart = "#";
  36. this.$id = "ace/mode/gitignore";
  37. }).call(Mode.prototype);
  38. exports.Mode = Mode;
  39. }); (function() {
  40. ace.require(["ace/mode/gitignore"], function(m) {
  41. if (typeof module == "object" && typeof exports == "object" && module) {
  42. module.exports = m;
  43. }
  44. });
  45. })();