erp_app 3.0.10 → 3.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. data/lib/erp_app/version.rb +1 -1
  2. data/public/javascripts/erp_app/codemirror/README.md +1 -1
  3. data/public/javascripts/erp_app/codemirror/doc/compress.html +11 -3
  4. data/public/javascripts/erp_app/codemirror/doc/docs.css +16 -5
  5. data/public/javascripts/erp_app/codemirror/doc/internals.html +6 -3
  6. data/public/javascripts/erp_app/codemirror/doc/manual.html +103 -41
  7. data/public/javascripts/erp_app/codemirror/doc/oldrelease.html +43 -5
  8. data/public/javascripts/erp_app/codemirror/doc/reporting.html +6 -3
  9. data/public/javascripts/erp_app/codemirror/doc/upgrade_v2.2.html +7 -4
  10. data/public/javascripts/erp_app/codemirror/keymap/vim.js +10 -6
  11. data/public/javascripts/erp_app/codemirror/lib/codemirror.css +16 -12
  12. data/public/javascripts/erp_app/codemirror/lib/codemirror.js +699 -787
  13. data/public/javascripts/erp_app/codemirror/lib/util/closetag.js +35 -35
  14. data/public/javascripts/erp_app/codemirror/lib/util/dialog.js +4 -1
  15. data/public/javascripts/erp_app/codemirror/lib/util/formatting.js +147 -253
  16. data/public/javascripts/erp_app/codemirror/lib/util/javascript-hint.js +3 -3
  17. data/public/javascripts/erp_app/codemirror/lib/util/loadmode.js +1 -1
  18. data/public/javascripts/erp_app/codemirror/lib/util/multiplex.js +5 -9
  19. data/public/javascripts/erp_app/codemirror/lib/util/overlay.js +3 -1
  20. data/public/javascripts/erp_app/codemirror/lib/util/pig-hint.js +1 -1
  21. data/public/javascripts/erp_app/codemirror/lib/util/runmode-standalone.js +90 -0
  22. data/public/javascripts/erp_app/codemirror/lib/util/runmode.js +8 -4
  23. data/public/javascripts/erp_app/codemirror/lib/util/search.js +4 -4
  24. data/public/javascripts/erp_app/codemirror/lib/util/searchcursor.js +13 -11
  25. data/public/javascripts/erp_app/codemirror/lib/util/simple-hint.js +89 -68
  26. data/public/javascripts/erp_app/codemirror/lib/util/xml-hint.js +8 -8
  27. data/public/javascripts/erp_app/codemirror/mode/clike/clike.js +6 -2
  28. data/public/javascripts/erp_app/codemirror/mode/clike/index.html +1 -0
  29. data/public/javascripts/erp_app/codemirror/mode/clike/scala.html +1 -0
  30. data/public/javascripts/erp_app/codemirror/mode/clojure/clojure.js +8 -9
  31. data/public/javascripts/erp_app/codemirror/mode/clojure/index.html +1 -0
  32. data/public/javascripts/erp_app/codemirror/mode/coffeescript/coffeescript.js +3 -3
  33. data/public/javascripts/erp_app/codemirror/mode/coffeescript/index.html +1 -0
  34. data/public/javascripts/erp_app/codemirror/mode/commonlisp/commonlisp.js +101 -0
  35. data/public/javascripts/erp_app/codemirror/mode/commonlisp/index.html +165 -0
  36. data/public/javascripts/erp_app/codemirror/mode/css/css.js +339 -15
  37. data/public/javascripts/erp_app/codemirror/mode/css/index.html +3 -0
  38. data/public/javascripts/erp_app/codemirror/mode/css/test.js +501 -0
  39. data/public/javascripts/erp_app/codemirror/mode/diff/index.html +1 -0
  40. data/public/javascripts/erp_app/codemirror/mode/ecl/ecl.js +1 -1
  41. data/public/javascripts/erp_app/codemirror/mode/erlang/index.html +1 -0
  42. data/public/javascripts/erp_app/codemirror/mode/gfm/gfm.js +10 -4
  43. data/public/javascripts/erp_app/codemirror/mode/gfm/index.html +1 -0
  44. data/public/javascripts/erp_app/codemirror/mode/go/go.js +2 -2
  45. data/public/javascripts/erp_app/codemirror/mode/go/index.html +1 -0
  46. data/public/javascripts/erp_app/codemirror/mode/groovy/groovy.js +1 -1
  47. data/public/javascripts/erp_app/codemirror/mode/groovy/index.html +1 -0
  48. data/public/javascripts/erp_app/codemirror/mode/haskell/haskell.js +2 -2
  49. data/public/javascripts/erp_app/codemirror/mode/haskell/index.html +1 -0
  50. data/public/javascripts/erp_app/codemirror/mode/haxe/haxe.js +4 -7
  51. data/public/javascripts/erp_app/codemirror/mode/haxe/index.html +1 -0
  52. data/public/javascripts/erp_app/codemirror/mode/htmlembedded/htmlembedded.js +8 -4
  53. data/public/javascripts/erp_app/codemirror/mode/htmlembedded/index.html +1 -0
  54. data/public/javascripts/erp_app/codemirror/mode/htmlmixed/htmlmixed.js +12 -13
  55. data/public/javascripts/erp_app/codemirror/mode/htmlmixed/index.html +1 -0
  56. data/public/javascripts/erp_app/codemirror/mode/javascript/index.html +1 -0
  57. data/public/javascripts/erp_app/codemirror/mode/javascript/javascript.js +3 -3
  58. data/public/javascripts/erp_app/codemirror/mode/jinja2/index.html +1 -0
  59. data/public/javascripts/erp_app/codemirror/mode/less/index.html +124 -2
  60. data/public/javascripts/erp_app/codemirror/mode/less/less.js +94 -60
  61. data/public/javascripts/erp_app/codemirror/mode/lua/index.html +1 -0
  62. data/public/javascripts/erp_app/codemirror/mode/markdown/index.html +3 -0
  63. data/public/javascripts/erp_app/codemirror/mode/markdown/markdown.js +134 -20
  64. data/public/javascripts/erp_app/codemirror/mode/markdown/test.js +1084 -0
  65. data/public/javascripts/erp_app/codemirror/mode/mysql/index.html +1 -0
  66. data/public/javascripts/erp_app/codemirror/mode/ntriples/index.html +1 -0
  67. data/public/javascripts/erp_app/codemirror/mode/ntriples/ntriples.js +4 -4
  68. data/public/javascripts/erp_app/codemirror/mode/ocaml/ocaml.js +1 -1
  69. data/public/javascripts/erp_app/codemirror/mode/pascal/index.html +1 -0
  70. data/public/javascripts/erp_app/codemirror/mode/pascal/pascal.js +1 -1
  71. data/public/javascripts/erp_app/codemirror/mode/perl/index.html +1 -0
  72. data/public/javascripts/erp_app/codemirror/mode/perl/perl.js +71 -71
  73. data/public/javascripts/erp_app/codemirror/mode/php/index.html +1 -0
  74. data/public/javascripts/erp_app/codemirror/mode/php/php.js +7 -9
  75. data/public/javascripts/erp_app/codemirror/mode/pig/index.html +1 -0
  76. data/public/javascripts/erp_app/codemirror/mode/pig/pig.js +3 -3
  77. data/public/javascripts/erp_app/codemirror/mode/plsql/index.html +1 -0
  78. data/public/javascripts/erp_app/codemirror/mode/properties/index.html +1 -0
  79. data/public/javascripts/erp_app/codemirror/mode/python/index.html +1 -0
  80. data/public/javascripts/erp_app/codemirror/mode/python/python.js +1 -1
  81. data/public/javascripts/erp_app/codemirror/mode/r/index.html +1 -0
  82. data/public/javascripts/erp_app/codemirror/mode/rpm/changes/index.html +1 -0
  83. data/public/javascripts/erp_app/codemirror/mode/rpm/spec/index.html +1 -0
  84. data/public/javascripts/erp_app/codemirror/mode/rst/index.html +1 -0
  85. data/public/javascripts/erp_app/codemirror/mode/ruby/index.html +1 -0
  86. data/public/javascripts/erp_app/codemirror/mode/rust/index.html +1 -0
  87. data/public/javascripts/erp_app/codemirror/mode/scheme/index.html +1 -0
  88. data/public/javascripts/erp_app/codemirror/mode/scheme/scheme.js +1 -1
  89. data/public/javascripts/erp_app/codemirror/mode/shell/shell.js +2 -2
  90. data/public/javascripts/erp_app/codemirror/mode/sieve/LICENSE +23 -0
  91. data/public/javascripts/erp_app/codemirror/mode/sieve/index.html +81 -0
  92. data/public/javascripts/erp_app/codemirror/mode/sieve/sieve.js +156 -0
  93. data/public/javascripts/erp_app/codemirror/mode/smalltalk/index.html +1 -0
  94. data/public/javascripts/erp_app/codemirror/mode/smalltalk/smalltalk.js +2 -2
  95. data/public/javascripts/erp_app/codemirror/mode/smarty/index.html +1 -0
  96. data/public/javascripts/erp_app/codemirror/mode/smarty/smarty.js +2 -2
  97. data/public/javascripts/erp_app/codemirror/mode/sparql/index.html +1 -0
  98. data/public/javascripts/erp_app/codemirror/mode/stex/index.html +3 -0
  99. data/public/javascripts/erp_app/codemirror/mode/stex/stex.js +1 -1
  100. data/public/javascripts/erp_app/codemirror/mode/stex/test.js +343 -0
  101. data/public/javascripts/erp_app/codemirror/mode/tiddlywiki/index.html +1 -0
  102. data/public/javascripts/erp_app/codemirror/mode/tiki/index.html +1 -0
  103. data/public/javascripts/erp_app/codemirror/mode/tiki/tiki.js +4 -11
  104. data/public/javascripts/erp_app/codemirror/mode/vb/index.html +1 -0
  105. data/public/javascripts/erp_app/codemirror/mode/vb/vb.js +2 -2
  106. data/public/javascripts/erp_app/codemirror/mode/vbscript/index.html +1 -0
  107. data/public/javascripts/erp_app/codemirror/mode/velocity/index.html +1 -0
  108. data/public/javascripts/erp_app/codemirror/mode/velocity/velocity.js +1 -1
  109. data/public/javascripts/erp_app/codemirror/mode/verilog/index.html +1 -0
  110. data/public/javascripts/erp_app/codemirror/mode/verilog/verilog.js +1 -1
  111. data/public/javascripts/erp_app/codemirror/mode/xml/index.html +2 -1
  112. data/public/javascripts/erp_app/codemirror/mode/xml/xml.js +2 -10
  113. data/public/javascripts/erp_app/codemirror/mode/xquery/index.html +3 -2
  114. data/public/javascripts/erp_app/codemirror/mode/xquery/xquery.js +7 -4
  115. data/public/javascripts/erp_app/codemirror/mode/yaml/index.html +1 -0
  116. data/public/javascripts/erp_app/codemirror/package.json +15 -23
  117. data/public/javascripts/erp_app/codemirror/test/driver.js +109 -22
  118. data/public/javascripts/erp_app/codemirror/test/index.html +129 -16
  119. data/public/javascripts/erp_app/codemirror/test/lint/lint.js +120 -0
  120. data/public/javascripts/erp_app/codemirror/test/lint/parse-js.js +1372 -0
  121. data/public/javascripts/erp_app/codemirror/test/mode_test.css +0 -12
  122. data/public/javascripts/erp_app/codemirror/test/mode_test.js +66 -27
  123. data/public/javascripts/erp_app/codemirror/test/phantom_driver.js +30 -0
  124. data/public/javascripts/erp_app/codemirror/test/run.js +32 -0
  125. data/public/javascripts/erp_app/codemirror/test/test.js +213 -8
  126. data/public/javascripts/erp_app/shared/dynamic_editable_grid.js +33 -27
  127. data/public/javascripts/erp_app/shared/dynamic_editable_grid_loader_panel.js +2 -1
  128. metadata +15 -3
  129. data/public/javascripts/erp_app/codemirror/mode/stex/test.html +0 -263
@@ -0,0 +1,343 @@
1
+ var MT = ModeTest;
2
+ MT.modeName = 'stex';
3
+ MT.modeOptions = {};
4
+
5
+ MT.testMode(
6
+ 'word',
7
+ 'foo',
8
+ [
9
+ null, 'foo'
10
+ ]
11
+ );
12
+
13
+ MT.testMode(
14
+ 'twoWords',
15
+ 'foo bar',
16
+ [
17
+ null, 'foo bar'
18
+ ]
19
+ );
20
+
21
+ MT.testMode(
22
+ 'beginEndDocument',
23
+ '\\begin{document}\n\\end{document}',
24
+ [
25
+ 'tag', '\\begin',
26
+ 'bracket', '{',
27
+ 'atom', 'document',
28
+ 'bracket', '}',
29
+ 'tag', '\\end',
30
+ 'bracket', '{',
31
+ 'atom', 'document',
32
+ 'bracket', '}'
33
+ ]
34
+ );
35
+
36
+ MT.testMode(
37
+ 'beginEndEquation',
38
+ '\\begin{equation}\n E=mc^2\n\\end{equation}',
39
+ [
40
+ 'tag', '\\begin',
41
+ 'bracket', '{',
42
+ 'atom', 'equation',
43
+ 'bracket', '}',
44
+ null, ' E=mc^2',
45
+ 'tag', '\\end',
46
+ 'bracket', '{',
47
+ 'atom', 'equation',
48
+ 'bracket', '}'
49
+ ]
50
+ );
51
+
52
+ MT.testMode(
53
+ 'beginModule',
54
+ '\\begin{module}[]',
55
+ [
56
+ 'tag', '\\begin',
57
+ 'bracket', '{',
58
+ 'atom', 'module',
59
+ 'bracket', '}[]'
60
+ ]
61
+ );
62
+
63
+ MT.testMode(
64
+ 'beginModuleId',
65
+ '\\begin{module}[id=bbt-size]',
66
+ [
67
+ 'tag', '\\begin',
68
+ 'bracket', '{',
69
+ 'atom', 'module',
70
+ 'bracket', '}[',
71
+ null, 'id=bbt-size',
72
+ 'bracket', ']'
73
+ ]
74
+ );
75
+
76
+ MT.testMode(
77
+ 'importModule',
78
+ '\\importmodule[b-b-t]{b-b-t}',
79
+ [
80
+ 'tag', '\\importmodule',
81
+ 'bracket', '[',
82
+ 'string', 'b-b-t',
83
+ 'bracket', ']{',
84
+ 'builtin', 'b-b-t',
85
+ 'bracket', '}'
86
+ ]
87
+ );
88
+
89
+ MT.testMode(
90
+ 'importModulePath',
91
+ '\\importmodule[\\KWARCslides{dmath/en/cardinality}]{card}',
92
+ [
93
+ 'tag', '\\importmodule',
94
+ 'bracket', '[',
95
+ 'tag', '\\KWARCslides',
96
+ 'bracket', '{',
97
+ 'string', 'dmath/en/cardinality',
98
+ 'bracket', '}]{',
99
+ 'builtin', 'card',
100
+ 'bracket', '}'
101
+ ]
102
+ );
103
+
104
+ MT.testMode(
105
+ 'psForPDF',
106
+ '\\PSforPDF[1]{#1}', // could treat #1 specially
107
+ [
108
+ 'tag', '\\PSforPDF',
109
+ 'bracket', '[',
110
+ 'atom', '1',
111
+ 'bracket', ']{',
112
+ null, '#1',
113
+ 'bracket', '}'
114
+ ]
115
+ );
116
+
117
+ MT.testMode(
118
+ 'comment',
119
+ '% foo',
120
+ [
121
+ 'comment', '% foo'
122
+ ]
123
+ );
124
+
125
+ MT.testMode(
126
+ 'tagComment',
127
+ '\\item% bar',
128
+ [
129
+ 'tag', '\\item',
130
+ 'comment', '% bar'
131
+ ]
132
+ );
133
+
134
+ MT.testMode(
135
+ 'commentTag',
136
+ ' % \\item',
137
+ [
138
+ null, ' ',
139
+ 'comment', '% \\item'
140
+ ]
141
+ );
142
+
143
+ MT.testMode(
144
+ 'commentLineBreak',
145
+ '%\nfoo',
146
+ [
147
+ 'comment', '%',
148
+ null, 'foo'
149
+ ]
150
+ );
151
+
152
+ MT.testMode(
153
+ 'tagErrorCurly',
154
+ '\\begin}{',
155
+ [
156
+ 'tag', '\\begin',
157
+ 'error', '}',
158
+ 'bracket', '{'
159
+ ]
160
+ );
161
+
162
+ MT.testMode(
163
+ 'tagErrorSquare',
164
+ '\\item]{',
165
+ [
166
+ 'tag', '\\item',
167
+ 'error', ']',
168
+ 'bracket', '{'
169
+ ]
170
+ );
171
+
172
+ MT.testMode(
173
+ 'commentCurly',
174
+ '% }',
175
+ [
176
+ 'comment', '% }'
177
+ ]
178
+ );
179
+
180
+ MT.testMode(
181
+ 'tagHash',
182
+ 'the \\# key',
183
+ [
184
+ null, 'the ',
185
+ 'tag', '\\#',
186
+ null, ' key'
187
+ ]
188
+ );
189
+
190
+ MT.testMode(
191
+ 'tagNumber',
192
+ 'a \\$5 stetson',
193
+ [
194
+ null, 'a ',
195
+ 'tag', '\\$',
196
+ 'atom', 5,
197
+ null, ' stetson'
198
+ ]
199
+ );
200
+
201
+ MT.testMode(
202
+ 'tagPercent',
203
+ '100\\% beef',
204
+ [
205
+ 'atom', '100',
206
+ 'tag', '\\%',
207
+ null, ' beef'
208
+ ]
209
+ );
210
+
211
+ MT.testMode(
212
+ 'tagAmpersand',
213
+ 'L \\& N',
214
+ [
215
+ null, 'L ',
216
+ 'tag', '\\&',
217
+ null, ' N'
218
+ ]
219
+ );
220
+
221
+ MT.testMode(
222
+ 'tagUnderscore',
223
+ 'foo\\_bar',
224
+ [
225
+ null, 'foo',
226
+ 'tag', '\\_',
227
+ null, 'bar'
228
+ ]
229
+ );
230
+
231
+ MT.testMode(
232
+ 'tagBracketOpen',
233
+ '\\emph{\\{}',
234
+ [
235
+ 'tag', '\\emph',
236
+ 'bracket', '{',
237
+ 'tag', '\\{',
238
+ 'bracket', '}'
239
+ ]
240
+ );
241
+
242
+ MT.testMode(
243
+ 'tagBracketClose',
244
+ '\\emph{\\}}',
245
+ [
246
+ 'tag', '\\emph',
247
+ 'bracket', '{',
248
+ 'tag', '\\}',
249
+ 'bracket', '}'
250
+ ]
251
+ );
252
+
253
+ MT.testMode(
254
+ 'tagLetterNumber',
255
+ 'section \\S1',
256
+ [
257
+ null, 'section ',
258
+ 'tag', '\\S',
259
+ 'atom', '1'
260
+ ]
261
+ );
262
+
263
+ MT.testMode(
264
+ 'textTagNumber',
265
+ 'para \\P2',
266
+ [
267
+ null, 'para ',
268
+ 'tag', '\\P',
269
+ 'atom', '2'
270
+ ]
271
+ );
272
+
273
+ MT.testMode(
274
+ 'thinspace',
275
+ 'x\\,y', // thinspace
276
+ [
277
+ null, 'x',
278
+ 'tag', '\\,',
279
+ null, 'y'
280
+ ]
281
+ );
282
+
283
+ MT.testMode(
284
+ 'thickspace',
285
+ 'x\\;y', // thickspace
286
+ [
287
+ null, 'x',
288
+ 'tag', '\\;',
289
+ null, 'y'
290
+ ]
291
+ );
292
+
293
+ MT.testMode(
294
+ 'negativeThinspace',
295
+ 'x\\!y', // negative thinspace
296
+ [
297
+ null, 'x',
298
+ 'tag', '\\!',
299
+ null, 'y'
300
+ ]
301
+ );
302
+
303
+ MT.testMode(
304
+ 'periodNotSentence',
305
+ 'J.\\ L.\\ is', // period not ending a sentence
306
+ [
307
+ null, 'J.\\ L.\\ is'
308
+ ]
309
+ ); // maybe could be better
310
+
311
+ MT.testMode(
312
+ 'periodSentence',
313
+ 'X\\@. The', // period ending a sentence
314
+ [
315
+ null, 'X',
316
+ 'tag', '\\@',
317
+ null, '. The'
318
+ ]
319
+ );
320
+
321
+ MT.testMode(
322
+ 'italicCorrection',
323
+ '{\\em If\\/} I', // italic correction
324
+ [
325
+ 'bracket', '{',
326
+ 'tag', '\\em',
327
+ null, ' If',
328
+ 'tag', '\\/',
329
+ 'bracket', '}',
330
+ null, ' I'
331
+ ]
332
+ );
333
+
334
+ MT.testMode(
335
+ 'tagBracket',
336
+ '\\newcommand{\\pop}',
337
+ [
338
+ 'tag', '\\newcommand',
339
+ 'bracket', '{',
340
+ 'tag', '\\pop',
341
+ 'bracket', '}'
342
+ ]
343
+ );
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: TiddlyWiki mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -1,5 +1,6 @@
1
1
  <html xmlns="http://www.w3.org/1999/xhtml">
2
2
  <head>
3
+ <meta charset="utf-8">
3
4
  <title>CodeMirror: Tiki wiki mode</title>
4
5
  <link rel="stylesheet" href="../../lib/codemirror.css">
5
6
  <script src="../../lib/codemirror.js"></script>
@@ -18,7 +18,7 @@ CodeMirror.defineMode('tiki', function(config, parserConfig) {
18
18
  function inLine(style, terminator) {
19
19
  return function(stream, state) {
20
20
  while(!stream.eol()) {
21
- stream.next()
21
+ stream.next();
22
22
  }
23
23
  state.tokenize = inText;
24
24
  return style;
@@ -37,9 +37,9 @@ CodeMirror.defineMode('tiki', function(config, parserConfig) {
37
37
  //non start of line
38
38
  switch (ch) { //switch is generally much faster than if, so it is used here
39
39
  case "{": //plugin
40
- type = stream.eat("/") ? "closeTag" : "openTag";
40
+ var type = stream.eat("/") ? "closeTag" : "openTag";
41
41
  stream.eatSpace();
42
- tagName = "";
42
+ var tagName = "";
43
43
  var c;
44
44
  while ((c = stream.eat(/[^\s\u00a0=\"\'\/?(}]/))) tagName += c;
45
45
  state.tokenize = inPlugin;
@@ -251,7 +251,7 @@ CodeMirror.defineMode('tiki', function(config, parserConfig) {
251
251
  if (err) setStyle = "error";
252
252
  if (type == "endPlugin") return cont();
253
253
  return pass();
254
- }
254
+ };
255
255
  }
256
256
 
257
257
  function attributes(type) {
@@ -301,13 +301,6 @@ CodeMirror.defineMode('tiki', function(config, parserConfig) {
301
301
  if (context) return context.indent + indentUnit;
302
302
  else return 0;
303
303
  },
304
- compareStates: function(a, b) {
305
- if (a.indented != b.indented || a.pluginName != b.pluginName) return false;
306
- for (var ca = a.context, cb = b.context; ; ca = ca.prev, cb = cb.prev) {
307
- if (!ca || !cb) return ca == cb;
308
- if (ca.pluginName != cb.pluginName) return false;
309
- }
310
- },
311
304
  electricChars: "/"
312
305
  };
313
306
  });
@@ -1,5 +1,6 @@
1
1
  <html>
2
2
  <head>
3
+ <meta charset="utf-8">
3
4
  <title>CodeMirror: VB.NET mode</title>
4
5
  <link rel="stylesheet" href="../../lib/codemirror.css">
5
6
  <script src="../../lib/codemirror.js"></script>
@@ -12,8 +12,8 @@ CodeMirror.defineMode("vb", function(conf, parserConf) {
12
12
  var tripleDelimiters = new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))");
13
13
  var identifiers = new RegExp("^[_A-Za-z][_A-Za-z0-9]*");
14
14
 
15
- var openingKeywords = ['class','module', 'sub','enum','select','while','if','function', 'get','set','property'];
16
- var middleKeywords = ['else','elseif','case'];
15
+ var openingKeywords = ['class','module', 'sub','enum','select','while','if','function', 'get','set','property', 'try'];
16
+ var middleKeywords = ['else','elseif','case', 'catch'];
17
17
  var endKeywords = ['next','loop'];
18
18
 
19
19
  var wordOperators = wordRegexp(['and', 'or', 'not', 'xor', 'in']);
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: VBScript mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: Velocity mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -5,7 +5,7 @@ CodeMirror.defineMode("velocity", function(config) {
5
5
  return obj;
6
6
  }
7
7
 
8
- var indentUnit = config.indentUnit
8
+ var indentUnit = config.indentUnit;
9
9
  var keywords = parseWords("#end #else #break #stop #[[ #]] " +
10
10
  "#{end} #{else} #{break} #{stop}");
11
11
  var functions = parseWords("#if #elseif #foreach #set #include #parse #macro #define #evaluate " +
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: Verilog mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -21,7 +21,7 @@ CodeMirror.defineMode("verilog", function(config, parserConfig) {
21
21
  }
22
22
  if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
23
23
  curPunc = ch;
24
- return null
24
+ return null;
25
25
  }
26
26
  if (/[\d']/.test(ch)) {
27
27
  stream.eatWhile(/[\w\.']/);
@@ -1,11 +1,12 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: XML mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
7
8
  <script src="xml.js"></script>
8
- <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
9
+ <style type="text/css">.foo{border-right: 1px solid red} .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
9
10
  <link rel="stylesheet" href="../../doc/docs.css">
10
11
  </head>
11
12
  <body>
@@ -30,7 +30,7 @@ CodeMirror.defineMode("xml", function(config, parserConfig) {
30
30
  },
31
31
  doNotIndent: {"pre": true},
32
32
  allowUnquoted: true,
33
- allowMissing: false
33
+ allowMissing: true
34
34
  } : {
35
35
  autoSelfClosers: {},
36
36
  implicitlyClosed: {},
@@ -229,7 +229,7 @@ CodeMirror.defineMode("xml", function(config, parserConfig) {
229
229
  if (type == "endTag") { popContext(); return cont(); }
230
230
  setStyle = "error";
231
231
  return cont(arguments.callee);
232
- }
232
+ };
233
233
  }
234
234
  function maybePopContext(nextTagName) {
235
235
  var parentTagName;
@@ -308,14 +308,6 @@ CodeMirror.defineMode("xml", function(config, parserConfig) {
308
308
  else return 0;
309
309
  },
310
310
 
311
- compareStates: function(a, b) {
312
- if (a.indented != b.indented || a.tokenize != b.tokenize) return false;
313
- for (var ca = a.context, cb = b.context; ; ca = ca.prev, cb = cb.prev) {
314
- if (!ca || !cb) return ca == cb;
315
- if (ca.tagName != cb.tagName || ca.indent != cb.indent) return false;
316
- }
317
- },
318
-
319
311
  electricChars: "/"
320
312
  };
321
313
  });
@@ -25,7 +25,8 @@ THE SOFTWARE.
25
25
  */
26
26
  -->
27
27
  <head>
28
- <title>CodeMirror 2: JavaScript mode</title>
28
+ <meta charset="utf-8">
29
+ <title>CodeMirror: XQuery mode</title>
29
30
  <link rel="stylesheet" href="../../lib/codemirror.css">
30
31
  <script src="http://codemirror.net/lib/codemirror.js"></script>
31
32
  <script src="xquery.js"></script>
@@ -41,7 +42,7 @@ THE SOFTWARE.
41
42
  </style>
42
43
  </head>
43
44
  <body>
44
- <h1>CodeMirror 2: XQuery mode</h1>
45
+ <h1>CodeMirror: XQuery mode</h1>
45
46
 
46
47
  <div class="cm-s-default">
47
48
  <textarea id="code" name="code">
@@ -56,7 +56,7 @@ CodeMirror.defineMode("xquery", function(config, parserConfig) {
56
56
  'preceding-sibling','processing-instruction','ref','return','returns','satisfies','schema','schema-element',
57
57
  'self','some','sortby','stable','text','then','to','treat','typeswitch','union','variable','version','where',
58
58
  'xquery', 'empty-sequence'];
59
- for(var i=0, l=basic.length; i < l; i++) { kwObj[basic[i]] = kw(basic[i])};
59
+ for(var i=0, l=basic.length; i < l; i++) { kwObj[basic[i]] = kw(basic[i]);};
60
60
 
61
61
  // a list of types. For each add a property to kwObj with the value of
62
62
  // {type: "atom", style: "atom"}
@@ -191,7 +191,7 @@ CodeMirror.defineMode("xquery", function(config, parserConfig) {
191
191
  if(!known) stream.eatWhile(/[\w\$_-]/);
192
192
 
193
193
  // gobble a colon in the case that is a lib func type call fn:doc
194
- var foundColon = stream.eat(":")
194
+ var foundColon = stream.eat(":");
195
195
 
196
196
  // if there's not a second colon, gobble another word. Otherwise, it's probably an axis specifier
197
197
  // which should get matched as a keyword
@@ -325,7 +325,7 @@ CodeMirror.defineMode("xquery", function(config, parserConfig) {
325
325
  state.tokenize = tokenBase;
326
326
  }
327
327
  return ret("tag", "tag");
328
- }
328
+ };
329
329
  }
330
330
 
331
331
  // tokenizer for XML attributes
@@ -365,6 +365,7 @@ CodeMirror.defineMode("xquery", function(config, parserConfig) {
365
365
 
366
366
  // handle comments, including nested
367
367
  function tokenXMLComment(stream, state) {
368
+ var ch;
368
369
  while (ch = stream.next()) {
369
370
  if (ch == "-" && stream.match("->", true)) {
370
371
  state.tokenize = tokenBase;
@@ -376,6 +377,7 @@ CodeMirror.defineMode("xquery", function(config, parserConfig) {
376
377
 
377
378
  // handle CDATA
378
379
  function tokenCDATA(stream, state) {
380
+ var ch;
379
381
  while (ch = stream.next()) {
380
382
  if (ch == "]" && stream.match("]", true)) {
381
383
  state.tokenize = tokenBase;
@@ -386,6 +388,7 @@ CodeMirror.defineMode("xquery", function(config, parserConfig) {
386
388
 
387
389
  // handle preprocessing instructions
388
390
  function tokenPreProcessing(stream, state) {
391
+ var ch;
389
392
  while (ch = stream.next()) {
390
393
  if (ch == "?" && stream.match(">", true)) {
391
394
  state.tokenize = tokenBase;
@@ -422,7 +425,7 @@ CodeMirror.defineMode("xquery", function(config, parserConfig) {
422
425
 
423
426
  function popStateStack(state) {
424
427
  var popped = state.stack.pop();
425
- var reinstateTokenize = state.stack.length && state.stack[state.stack.length-1].tokenize
428
+ var reinstateTokenize = state.stack.length && state.stack[state.stack.length-1].tokenize;
426
429
  state.tokenize = reinstateTokenize || tokenBase;
427
430
  }
428
431
 
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: YAML mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -1,29 +1,21 @@
1
1
  {
2
- "name": "CodeMirror",
3
- "version":"2.32.0",
2
+ "name": "codemirror",
3
+ "version":"2.34.0",
4
4
  "main": "codemirror.js",
5
5
  "description": "In-browser code editing made bearable",
6
- "licenses": [
7
- {
8
- "type": "MIT",
9
- "url": "http://codemirror.net/LICENSE"
10
- }
11
- ],
12
- "directories": {
13
- "lib": "./lib"
14
- },
15
- "bugs": "http://github.com/marijnh/CodeMirror2/issues",
6
+ "licenses": [{"type": "MIT",
7
+ "url": "http://codemirror.net/LICENSE"}],
8
+ "directories": {"lib": "./lib"},
9
+ "scripts": {"test": "node ./test/run.js"},
10
+ "devDependencies": {"node-static": "0.6.0"},
11
+ "bugs": "http://github.com/marijnh/CodeMirror/issues",
16
12
  "keywords": ["JavaScript", "CodeMirror", "Editor"],
17
13
  "homepage": "http://codemirror.net",
18
- "maintainers":[ {
19
- "name": "Marijn Haverbeke",
20
- "email": "marijnh@gmail.com",
21
- "web": "http://codemirror.net"
22
- }],
23
- "repositories": [
24
- {
25
- "type": "git",
26
- "url": "https://github.com/marijnh/CodeMirror2.git"
27
- }
28
- ]
14
+ "maintainers":[{"name": "Marijn Haverbeke",
15
+ "email": "marijnh@gmail.com",
16
+ "web": "http://marijnhaverbeke.nl"}],
17
+ "repositories": [{"type": "git",
18
+ "url": "http://marijnhaverbeke.nl/git/codemirror"},
19
+ {"type": "git",
20
+ "url": "https://github.com/marijnh/CodeMirror.git"}]
29
21
  }