aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/LocalFilesEditor/codemirror/mode/javascript/index.html
diff options
context:
space:
mode:
authormistic100 <mistic@strangeplanet.fr>2015-07-24 22:44:39 +0200
committermistic100 <mistic@strangeplanet.fr>2015-07-26 19:11:36 +0200
commit4e71ba9d3ea40cd2d817965e5eed4a2fe1b876b3 (patch)
treeaf7f5291540806e5fde21db1d98d590579549055 /plugins/LocalFilesEditor/codemirror/mode/javascript/index.html
parent32138f1fbd7637dffaaad0c8ca677e43a0d13831 (diff)
Remove core plugins from core repository
Diffstat (limited to 'plugins/LocalFilesEditor/codemirror/mode/javascript/index.html')
-rw-r--r--plugins/LocalFilesEditor/codemirror/mode/javascript/index.html78
1 files changed, 0 insertions, 78 deletions
diff --git a/plugins/LocalFilesEditor/codemirror/mode/javascript/index.html b/plugins/LocalFilesEditor/codemirror/mode/javascript/index.html
deleted file mode 100644
index 7b528e041..000000000
--- a/plugins/LocalFilesEditor/codemirror/mode/javascript/index.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <title>CodeMirror 2: JavaScript mode</title>
- <link rel="stylesheet" href="../../lib/codemirror.css">
- <script src="../../lib/codemirror.js"></script>
- <script src="javascript.js"></script>
- <link rel="stylesheet" href="javascript.css">
- <link rel="stylesheet" href="../../css/docs.css">
- <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
- </head>
- <body>
- <h1>CodeMirror 2: JavaScript mode</h1>
-
-<div><textarea id="code" name="code">
-// Demo code (the actual new parser character stream implementation)
-
-function StringStream(string) {
- this.pos = 0;
- this.string = string;
-}
-
-StringStream.prototype = {
- done: function() {return this.pos >= this.string.length;},
- peek: function() {return this.string.charAt(this.pos);},
- next: function() {
- if (this.pos &lt; this.string.length)
- return this.string.charAt(this.pos++);
- },
- eat: function(match) {
- var ch = this.string.charAt(this.pos);
- if (typeof match == "string") var ok = ch == match;
- else var ok = ch &amp;&amp; match.test ? match.test(ch) : match(ch);
- if (ok) {this.pos++; return ch;}
- },
- eatWhile: function(match) {
- var start = this.pos;
- while (this.eat(match));
- if (this.pos > start) return this.string.slice(start, this.pos);
- },
- backUp: function(n) {this.pos -= n;},
- column: function() {return this.pos;},
- eatSpace: function() {
- var start = this.pos;
- while (/\s/.test(this.string.charAt(this.pos))) this.pos++;
- return this.pos - start;
- },
- match: function(pattern, consume, caseInsensitive) {
- if (typeof pattern == "string") {
- function cased(str) {return caseInsensitive ? str.toLowerCase() : str;}
- if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) {
- if (consume !== false) this.pos += str.length;
- return true;
- }
- }
- else {
- var match = this.string.slice(this.pos).match(pattern);
- if (match &amp;&amp; consume !== false) this.pos += match[0].length;
- return match;
- }
- }
-};
-</textarea></div>
-
- <script>
- var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
- lineNumbers: true,
- matchBrackets: true
- });
- </script>
-
- <p>JavaScript mode supports a single configuration
- option, <code>json</code>, which will set the mode to expect JSON
- data rather than a JavaScript program.</p>
-
- <p><strong>MIME types defined:</strong> <code>text/javascript</code>, <code>application/json</code>.</p>
- </body>
-</html>