erp_app 3.0.10 → 3.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/erp_app/version.rb +1 -1
- data/public/javascripts/erp_app/codemirror/README.md +1 -1
- data/public/javascripts/erp_app/codemirror/doc/compress.html +11 -3
- data/public/javascripts/erp_app/codemirror/doc/docs.css +16 -5
- data/public/javascripts/erp_app/codemirror/doc/internals.html +6 -3
- data/public/javascripts/erp_app/codemirror/doc/manual.html +103 -41
- data/public/javascripts/erp_app/codemirror/doc/oldrelease.html +43 -5
- data/public/javascripts/erp_app/codemirror/doc/reporting.html +6 -3
- data/public/javascripts/erp_app/codemirror/doc/upgrade_v2.2.html +7 -4
- data/public/javascripts/erp_app/codemirror/keymap/vim.js +10 -6
- data/public/javascripts/erp_app/codemirror/lib/codemirror.css +16 -12
- data/public/javascripts/erp_app/codemirror/lib/codemirror.js +699 -787
- data/public/javascripts/erp_app/codemirror/lib/util/closetag.js +35 -35
- data/public/javascripts/erp_app/codemirror/lib/util/dialog.js +4 -1
- data/public/javascripts/erp_app/codemirror/lib/util/formatting.js +147 -253
- data/public/javascripts/erp_app/codemirror/lib/util/javascript-hint.js +3 -3
- data/public/javascripts/erp_app/codemirror/lib/util/loadmode.js +1 -1
- data/public/javascripts/erp_app/codemirror/lib/util/multiplex.js +5 -9
- data/public/javascripts/erp_app/codemirror/lib/util/overlay.js +3 -1
- data/public/javascripts/erp_app/codemirror/lib/util/pig-hint.js +1 -1
- data/public/javascripts/erp_app/codemirror/lib/util/runmode-standalone.js +90 -0
- data/public/javascripts/erp_app/codemirror/lib/util/runmode.js +8 -4
- data/public/javascripts/erp_app/codemirror/lib/util/search.js +4 -4
- data/public/javascripts/erp_app/codemirror/lib/util/searchcursor.js +13 -11
- data/public/javascripts/erp_app/codemirror/lib/util/simple-hint.js +89 -68
- data/public/javascripts/erp_app/codemirror/lib/util/xml-hint.js +8 -8
- data/public/javascripts/erp_app/codemirror/mode/clike/clike.js +6 -2
- data/public/javascripts/erp_app/codemirror/mode/clike/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/clike/scala.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/clojure/clojure.js +8 -9
- data/public/javascripts/erp_app/codemirror/mode/clojure/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/coffeescript/coffeescript.js +3 -3
- data/public/javascripts/erp_app/codemirror/mode/coffeescript/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/commonlisp/commonlisp.js +101 -0
- data/public/javascripts/erp_app/codemirror/mode/commonlisp/index.html +165 -0
- data/public/javascripts/erp_app/codemirror/mode/css/css.js +339 -15
- data/public/javascripts/erp_app/codemirror/mode/css/index.html +3 -0
- data/public/javascripts/erp_app/codemirror/mode/css/test.js +501 -0
- data/public/javascripts/erp_app/codemirror/mode/diff/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/ecl/ecl.js +1 -1
- data/public/javascripts/erp_app/codemirror/mode/erlang/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/gfm/gfm.js +10 -4
- data/public/javascripts/erp_app/codemirror/mode/gfm/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/go/go.js +2 -2
- data/public/javascripts/erp_app/codemirror/mode/go/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/groovy/groovy.js +1 -1
- data/public/javascripts/erp_app/codemirror/mode/groovy/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/haskell/haskell.js +2 -2
- data/public/javascripts/erp_app/codemirror/mode/haskell/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/haxe/haxe.js +4 -7
- data/public/javascripts/erp_app/codemirror/mode/haxe/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/htmlembedded/htmlembedded.js +8 -4
- data/public/javascripts/erp_app/codemirror/mode/htmlembedded/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/htmlmixed/htmlmixed.js +12 -13
- data/public/javascripts/erp_app/codemirror/mode/htmlmixed/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/javascript/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/javascript/javascript.js +3 -3
- data/public/javascripts/erp_app/codemirror/mode/jinja2/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/less/index.html +124 -2
- data/public/javascripts/erp_app/codemirror/mode/less/less.js +94 -60
- data/public/javascripts/erp_app/codemirror/mode/lua/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/markdown/index.html +3 -0
- data/public/javascripts/erp_app/codemirror/mode/markdown/markdown.js +134 -20
- data/public/javascripts/erp_app/codemirror/mode/markdown/test.js +1084 -0
- data/public/javascripts/erp_app/codemirror/mode/mysql/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/ntriples/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/ntriples/ntriples.js +4 -4
- data/public/javascripts/erp_app/codemirror/mode/ocaml/ocaml.js +1 -1
- data/public/javascripts/erp_app/codemirror/mode/pascal/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/pascal/pascal.js +1 -1
- data/public/javascripts/erp_app/codemirror/mode/perl/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/perl/perl.js +71 -71
- data/public/javascripts/erp_app/codemirror/mode/php/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/php/php.js +7 -9
- data/public/javascripts/erp_app/codemirror/mode/pig/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/pig/pig.js +3 -3
- data/public/javascripts/erp_app/codemirror/mode/plsql/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/properties/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/python/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/python/python.js +1 -1
- data/public/javascripts/erp_app/codemirror/mode/r/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/rpm/changes/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/rpm/spec/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/rst/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/ruby/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/rust/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/scheme/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/scheme/scheme.js +1 -1
- data/public/javascripts/erp_app/codemirror/mode/shell/shell.js +2 -2
- data/public/javascripts/erp_app/codemirror/mode/sieve/LICENSE +23 -0
- data/public/javascripts/erp_app/codemirror/mode/sieve/index.html +81 -0
- data/public/javascripts/erp_app/codemirror/mode/sieve/sieve.js +156 -0
- data/public/javascripts/erp_app/codemirror/mode/smalltalk/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/smalltalk/smalltalk.js +2 -2
- data/public/javascripts/erp_app/codemirror/mode/smarty/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/smarty/smarty.js +2 -2
- data/public/javascripts/erp_app/codemirror/mode/sparql/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/stex/index.html +3 -0
- data/public/javascripts/erp_app/codemirror/mode/stex/stex.js +1 -1
- data/public/javascripts/erp_app/codemirror/mode/stex/test.js +343 -0
- data/public/javascripts/erp_app/codemirror/mode/tiddlywiki/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/tiki/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/tiki/tiki.js +4 -11
- data/public/javascripts/erp_app/codemirror/mode/vb/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/vb/vb.js +2 -2
- data/public/javascripts/erp_app/codemirror/mode/vbscript/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/velocity/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/velocity/velocity.js +1 -1
- data/public/javascripts/erp_app/codemirror/mode/verilog/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/mode/verilog/verilog.js +1 -1
- data/public/javascripts/erp_app/codemirror/mode/xml/index.html +2 -1
- data/public/javascripts/erp_app/codemirror/mode/xml/xml.js +2 -10
- data/public/javascripts/erp_app/codemirror/mode/xquery/index.html +3 -2
- data/public/javascripts/erp_app/codemirror/mode/xquery/xquery.js +7 -4
- data/public/javascripts/erp_app/codemirror/mode/yaml/index.html +1 -0
- data/public/javascripts/erp_app/codemirror/package.json +15 -23
- data/public/javascripts/erp_app/codemirror/test/driver.js +109 -22
- data/public/javascripts/erp_app/codemirror/test/index.html +129 -16
- data/public/javascripts/erp_app/codemirror/test/lint/lint.js +120 -0
- data/public/javascripts/erp_app/codemirror/test/lint/parse-js.js +1372 -0
- data/public/javascripts/erp_app/codemirror/test/mode_test.css +0 -12
- data/public/javascripts/erp_app/codemirror/test/mode_test.js +66 -27
- data/public/javascripts/erp_app/codemirror/test/phantom_driver.js +30 -0
- data/public/javascripts/erp_app/codemirror/test/run.js +32 -0
- data/public/javascripts/erp_app/codemirror/test/test.js +213 -8
- data/public/javascripts/erp_app/shared/dynamic_editable_grid.js +33 -27
- data/public/javascripts/erp_app/shared/dynamic_editable_grid_loader_panel.js +2 -1
- metadata +15 -3
- data/public/javascripts/erp_app/codemirror/mode/stex/test.html +0 -263
|
@@ -166,7 +166,7 @@ CodeMirror.defineMode("scheme", function (config, mode) {
|
|
|
166
166
|
stream.skipToEnd(); // rest of the line is a comment
|
|
167
167
|
returnType = COMMENT;
|
|
168
168
|
} else if (ch == "(" || ch == "[") {
|
|
169
|
-
|
|
169
|
+
var keyWord = ''; var indentTemp = stream.column(), letter;
|
|
170
170
|
/**
|
|
171
171
|
Either
|
|
172
172
|
(indent-word ..
|
|
@@ -60,7 +60,7 @@ CodeMirror.defineMode('shell', function(config) {
|
|
|
60
60
|
stream.eatWhile(/\w/);
|
|
61
61
|
var cur = stream.current();
|
|
62
62
|
if (stream.peek() === '=' && /\w+/.test(cur)) return 'def';
|
|
63
|
-
return words[cur]
|
|
63
|
+
return words.hasOwnProperty(cur) ? words[cur] : null;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
function tokenString(quote) {
|
|
@@ -107,7 +107,7 @@ CodeMirror.defineMode('shell', function(config) {
|
|
|
107
107
|
};
|
|
108
108
|
|
|
109
109
|
return {
|
|
110
|
-
startState: function() {return {tokens:[]}},
|
|
110
|
+
startState: function() {return {tokens:[]};},
|
|
111
111
|
token: function(stream, state) {
|
|
112
112
|
if (stream.eatSpace()) return null;
|
|
113
113
|
return tokenize(stream, state);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Copyright (C) 2012 Thomas Schmid <schmid-thomas@gmx.net>
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
|
11
|
+
all copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
+
THE SOFTWARE.
|
|
20
|
+
|
|
21
|
+
Please note that some subdirectories of the CodeMirror distribution
|
|
22
|
+
include their own LICENSE files, and are released under different
|
|
23
|
+
licences.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>CodeMirror: Sieve (RFC5228) mode</title>
|
|
6
|
+
<link rel="stylesheet" href="../../doc/docs.css">
|
|
7
|
+
<link rel="stylesheet" href="../../lib/codemirror.css">
|
|
8
|
+
<script src="../../lib/codemirror.js"></script>
|
|
9
|
+
<script src="sieve.js"></script>
|
|
10
|
+
<style>.CodeMirror {background: #f8f8f8;}</style>
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<h1>CodeMirror: Sieve (RFC5228) mode</h1>
|
|
14
|
+
<form><textarea id="code" name="code">
|
|
15
|
+
#
|
|
16
|
+
# Example Sieve Filter
|
|
17
|
+
# Declare any optional features or extension used by the script
|
|
18
|
+
#
|
|
19
|
+
|
|
20
|
+
require ["fileinto", "reject"];
|
|
21
|
+
|
|
22
|
+
#
|
|
23
|
+
# Reject any large messages (note that the four leading dots get
|
|
24
|
+
# "stuffed" to three)
|
|
25
|
+
#
|
|
26
|
+
if size :over 1M
|
|
27
|
+
{
|
|
28
|
+
reject text:
|
|
29
|
+
Please do not send me large attachments.
|
|
30
|
+
Put your file on a server and send me the URL.
|
|
31
|
+
Thank you.
|
|
32
|
+
.... Fred
|
|
33
|
+
.
|
|
34
|
+
;
|
|
35
|
+
stop;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
#
|
|
39
|
+
# Handle messages from known mailing lists
|
|
40
|
+
# Move messages from IETF filter discussion list to filter folder
|
|
41
|
+
#
|
|
42
|
+
if header :is "Sender" "owner-ietf-mta-filters@imc.org"
|
|
43
|
+
{
|
|
44
|
+
fileinto "filter"; # move to "filter" folder
|
|
45
|
+
}
|
|
46
|
+
#
|
|
47
|
+
# Keep all messages to or from people in my company
|
|
48
|
+
#
|
|
49
|
+
elsif address :domain :is ["From", "To"] "example.com"
|
|
50
|
+
{
|
|
51
|
+
keep; # keep in "In" folder
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
#
|
|
55
|
+
# Try and catch unsolicited email. If a message is not to me,
|
|
56
|
+
# or it contains a subject known to be spam, file it away.
|
|
57
|
+
#
|
|
58
|
+
elsif anyof (not address :all :contains
|
|
59
|
+
["To", "Cc", "Bcc"] "me@example.com",
|
|
60
|
+
header :matches "subject"
|
|
61
|
+
["*make*money*fast*", "*university*dipl*mas*"])
|
|
62
|
+
{
|
|
63
|
+
# If message header does not contain my address,
|
|
64
|
+
# it's from a list.
|
|
65
|
+
fileinto "spam"; # move to "spam" folder
|
|
66
|
+
}
|
|
67
|
+
else
|
|
68
|
+
{
|
|
69
|
+
# Move all other (non-company) mail to "personal"
|
|
70
|
+
# folder.
|
|
71
|
+
fileinto "personal";
|
|
72
|
+
}
|
|
73
|
+
</textarea></form>
|
|
74
|
+
<script>
|
|
75
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {});
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<p><strong>MIME types defined:</strong> <code>application/sieve</code>.</p>
|
|
79
|
+
|
|
80
|
+
</body>
|
|
81
|
+
</html>
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* See LICENSE in this directory for the license under which this code
|
|
3
|
+
* is released.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
CodeMirror.defineMode("sieve", function(config) {
|
|
7
|
+
function words(str) {
|
|
8
|
+
var obj = {}, words = str.split(" ");
|
|
9
|
+
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
|
10
|
+
return obj;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
var keywords = words("if elsif else stop require");
|
|
14
|
+
var atoms = words("true false not");
|
|
15
|
+
var indentUnit = config.indentUnit;
|
|
16
|
+
|
|
17
|
+
function tokenBase(stream, state) {
|
|
18
|
+
|
|
19
|
+
var ch = stream.next();
|
|
20
|
+
if (ch == "/" && stream.eat("*")) {
|
|
21
|
+
state.tokenize = tokenCComment;
|
|
22
|
+
return tokenCComment(stream, state);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (ch === '#') {
|
|
26
|
+
stream.skipToEnd();
|
|
27
|
+
return "comment";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (ch == "\"") {
|
|
31
|
+
state.tokenize = tokenString(ch);
|
|
32
|
+
return state.tokenize(stream, state);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (ch === "{")
|
|
36
|
+
{
|
|
37
|
+
state._indent++;
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (ch === "}")
|
|
42
|
+
{
|
|
43
|
+
state._indent--;
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (/[{}\(\),;]/.test(ch))
|
|
48
|
+
return null;
|
|
49
|
+
|
|
50
|
+
// 1*DIGIT "K" / "M" / "G"
|
|
51
|
+
if (/\d/.test(ch)) {
|
|
52
|
+
stream.eatWhile(/[\d]/);
|
|
53
|
+
stream.eat(/[KkMmGg]/);
|
|
54
|
+
return "number";
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// ":" (ALPHA / "_") *(ALPHA / DIGIT / "_")
|
|
58
|
+
if (ch == ":") {
|
|
59
|
+
stream.eatWhile(/[a-zA-Z_]/);
|
|
60
|
+
stream.eatWhile(/[a-zA-Z0-9_]/);
|
|
61
|
+
|
|
62
|
+
return "operator";
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
stream.eatWhile(/[\w\$_]/);
|
|
66
|
+
var cur = stream.current();
|
|
67
|
+
|
|
68
|
+
// "text:" *(SP / HTAB) (hash-comment / CRLF)
|
|
69
|
+
// *(multiline-literal / multiline-dotstart)
|
|
70
|
+
// "." CRLF
|
|
71
|
+
if ((cur == "text") && stream.eat(":"))
|
|
72
|
+
{
|
|
73
|
+
state.tokenize = tokenMultiLineString;
|
|
74
|
+
return "string";
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (keywords.propertyIsEnumerable(cur))
|
|
78
|
+
return "keyword";
|
|
79
|
+
|
|
80
|
+
if (atoms.propertyIsEnumerable(cur))
|
|
81
|
+
return "atom";
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function tokenMultiLineString(stream, state)
|
|
85
|
+
{
|
|
86
|
+
state._multiLineString = true;
|
|
87
|
+
// the first line is special it may contain a comment
|
|
88
|
+
if (!stream.sol()) {
|
|
89
|
+
stream.eatSpace();
|
|
90
|
+
|
|
91
|
+
if (stream.peek() == "#") {
|
|
92
|
+
stream.skipToEnd();
|
|
93
|
+
return "comment";
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
stream.skipToEnd();
|
|
97
|
+
return "string";
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if ((stream.next() == ".") && (stream.eol()))
|
|
101
|
+
{
|
|
102
|
+
state._multiLineString = false;
|
|
103
|
+
state.tokenize = tokenBase;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return "string";
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function tokenCComment(stream, state) {
|
|
110
|
+
var maybeEnd = false, ch;
|
|
111
|
+
while ((ch = stream.next()) != null) {
|
|
112
|
+
if (maybeEnd && ch == "/") {
|
|
113
|
+
state.tokenize = tokenBase;
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
maybeEnd = (ch == "*");
|
|
117
|
+
}
|
|
118
|
+
return "comment";
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function tokenString(quote) {
|
|
122
|
+
return function(stream, state) {
|
|
123
|
+
var escaped = false, ch;
|
|
124
|
+
while ((ch = stream.next()) != null) {
|
|
125
|
+
if (ch == quote && !escaped)
|
|
126
|
+
break;
|
|
127
|
+
escaped = !escaped && ch == "\\";
|
|
128
|
+
}
|
|
129
|
+
if (!escaped) state.tokenize = tokenBase;
|
|
130
|
+
return "string";
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return {
|
|
135
|
+
startState: function(base) {
|
|
136
|
+
return {tokenize: tokenBase,
|
|
137
|
+
baseIndent: base || 0,
|
|
138
|
+
_indent: 0};
|
|
139
|
+
},
|
|
140
|
+
|
|
141
|
+
token: function(stream, state) {
|
|
142
|
+
if (stream.eatSpace())
|
|
143
|
+
return null;
|
|
144
|
+
|
|
145
|
+
return (state.tokenize || tokenBase)(stream, state);;
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
indent: function(state, textAfter) {
|
|
149
|
+
return state.baseIndent + state._indent * indentUnit;
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
electricChars: "}"
|
|
153
|
+
};
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
CodeMirror.defineMIME("application/sieve", "sieve");
|
|
@@ -63,7 +63,7 @@ CodeMirror.defineMode('smalltalk', function(config, modeConfig) {
|
|
|
63
63
|
|
|
64
64
|
} else if (/\d/.test(aChar)) {
|
|
65
65
|
stream.eatWhile(/[\w\d]/);
|
|
66
|
-
token.name = 'number'
|
|
66
|
+
token.name = 'number';
|
|
67
67
|
|
|
68
68
|
} else if (/[\w_]/.test(aChar)) {
|
|
69
69
|
stream.eatWhile(/[\w\d_]/);
|
|
@@ -100,7 +100,7 @@ CodeMirror.defineMode('smalltalk', function(config, modeConfig) {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
return token;
|
|
103
|
-
}
|
|
103
|
+
};
|
|
104
104
|
|
|
105
105
|
return {
|
|
106
106
|
startState: function() {
|
|
@@ -5,7 +5,7 @@ CodeMirror.defineMode("smarty", function(config, parserConfig) {
|
|
|
5
5
|
operatorChars: /[+\-*&%=<>!?]/,
|
|
6
6
|
validIdentifier: /[a-zA-Z0-9\_]/,
|
|
7
7
|
stringChar: /[\'\"]/
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
9
|
var leftDelim = (typeof config.mode.leftDelimiter != 'undefined') ? config.mode.leftDelimiter : "{";
|
|
10
10
|
var rightDelim = (typeof config.mode.rightDelimiter != 'undefined') ? config.mode.rightDelimiter : "}";
|
|
11
11
|
function ret(style, lst) { last = lst; return style; }
|
|
@@ -142,7 +142,7 @@ CodeMirror.defineMode("smarty", function(config, parserConfig) {
|
|
|
142
142
|
return style;
|
|
143
143
|
},
|
|
144
144
|
electricChars: ""
|
|
145
|
-
}
|
|
145
|
+
};
|
|
146
146
|
});
|
|
147
147
|
|
|
148
148
|
CodeMirror.defineMIME("text/x-smarty", "smarty");
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
4
5
|
<title>CodeMirror: sTeX mode</title>
|
|
5
6
|
<link rel="stylesheet" href="../../lib/codemirror.css">
|
|
6
7
|
<script src="../../lib/codemirror.js"></script>
|
|
@@ -91,5 +92,7 @@
|
|
|
91
92
|
|
|
92
93
|
<p><strong>MIME types defined:</strong> <code>text/x-stex</code>.</p>
|
|
93
94
|
|
|
95
|
+
<p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#stex_*">normal</a>, <a href="../../test/index.html#verbose,stex_*">verbose</a>.</p>
|
|
96
|
+
|
|
94
97
|
</body>
|
|
95
98
|
</html>
|