| OLD | NEW |
| 1 // CodeMirror, copyright (c) by Marijn Haverbeke and others | 1 // CodeMirror, copyright (c) by Marijn Haverbeke and others |
| 2 // Distributed under an MIT license: http://codemirror.net/LICENSE | 2 // Distributed under an MIT license: http://codemirror.net/LICENSE |
| 3 | 3 |
| 4 (function(mod) { | 4 (function(mod) { |
| 5 if (typeof exports == "object" && typeof module == "object") // CommonJS | 5 if (typeof exports == "object" && typeof module == "object") // CommonJS |
| 6 mod(require("../../lib/codemirror")); | 6 mod(require("../../lib/codemirror")); |
| 7 else if (typeof define == "function" && define.amd) // AMD | 7 else if (typeof define == "function" && define.amd) // AMD |
| 8 define(["../../lib/codemirror"], mod); | 8 define(["../../lib/codemirror"], mod); |
| 9 else // Plain browser env | 9 else // Plain browser env |
| 10 mod(CodeMirror); | 10 mod(CodeMirror); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 function tokenize(stream, state) { | 123 function tokenize(stream, state) { |
| 124 return (state.tokens[0] || tokenBase) (stream, state); | 124 return (state.tokens[0] || tokenBase) (stream, state); |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 return { | 127 return { |
| 128 startState: function() {return {tokens:[]};}, | 128 startState: function() {return {tokens:[]};}, |
| 129 token: function(stream, state) { | 129 token: function(stream, state) { |
| 130 return tokenize(stream, state); | 130 return tokenize(stream, state); |
| 131 } | 131 }, |
| 132 lineComment: '#', |
| 133 fold: "brace" |
| 132 }; | 134 }; |
| 133 }); | 135 }); |
| 134 | 136 |
| 135 CodeMirror.defineMIME('text/x-sh', 'shell'); | 137 CodeMirror.defineMIME('text/x-sh', 'shell'); |
| 136 | 138 |
| 137 }); | 139 }); |
| OLD | NEW |