codemirror-rails 3.02 → 3.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +1 -1
  3. data/LICENSE +1 -1
  4. data/codemirror-rails.gemspec +1 -0
  5. data/doc/CodeMirror-LICENSE +5 -1
  6. data/lib/codemirror/rails/version.rb +2 -2
  7. data/vendor/assets/javascripts/codemirror/{utils → addons/dialog}/dialog.js +4 -0
  8. data/vendor/assets/javascripts/codemirror/addons/display/placeholder.js +54 -0
  9. data/vendor/assets/javascripts/codemirror/addons/edit/closebrackets.js +54 -0
  10. data/vendor/assets/javascripts/codemirror/{utils → addons/edit}/closetag.js +9 -8
  11. data/vendor/assets/javascripts/codemirror/{utils → addons/edit}/continuecomment.js +12 -4
  12. data/vendor/assets/javascripts/codemirror/addons/edit/continuelist.js +25 -0
  13. data/vendor/assets/javascripts/codemirror/{utils → addons/edit}/matchbrackets.js +30 -11
  14. data/vendor/assets/javascripts/codemirror/addons/fold/brace-fold.js +31 -0
  15. data/vendor/assets/javascripts/codemirror/addons/fold/foldcode.js +32 -0
  16. data/vendor/assets/javascripts/codemirror/addons/fold/indent-fold.js +11 -0
  17. data/vendor/assets/javascripts/codemirror/addons/fold/xml-fold.js +64 -0
  18. data/vendor/assets/javascripts/codemirror/addons/hint/html-hint.js +582 -0
  19. data/vendor/assets/javascripts/codemirror/{utils → addons/hint}/javascript-hint.js +15 -11
  20. data/vendor/assets/javascripts/codemirror/{utils → addons/hint}/pig-hint.js +19 -19
  21. data/vendor/assets/javascripts/codemirror/{utils → addons/hint}/python-hint.js +2 -2
  22. data/vendor/assets/javascripts/codemirror/addons/hint/show-hint.js +180 -0
  23. data/vendor/assets/javascripts/codemirror/{utils → addons/hint}/xml-hint.js +5 -18
  24. data/vendor/assets/javascripts/codemirror/addons/lint/javascript-lint.js +127 -0
  25. data/vendor/assets/javascripts/codemirror/addons/lint/json-lint.js +14 -0
  26. data/vendor/assets/javascripts/codemirror/addons/lint/lint.js +197 -0
  27. data/vendor/assets/javascripts/codemirror/{utils → addons/mode}/loadmode.js +0 -0
  28. data/vendor/assets/javascripts/codemirror/{utils → addons/mode}/multiplex.js +2 -2
  29. data/vendor/assets/javascripts/codemirror/{utils → addons/mode}/overlay.js +2 -2
  30. data/vendor/assets/javascripts/codemirror/{utils → addons/runmode}/colorize.js +0 -0
  31. data/vendor/assets/javascripts/codemirror/{utils → addons/runmode}/runmode-standalone.js +2 -3
  32. data/vendor/assets/javascripts/codemirror/{utils → addons/runmode}/runmode.js +0 -0
  33. data/vendor/assets/javascripts/codemirror/addons/runmode/runmode.node.js +89 -0
  34. data/vendor/assets/javascripts/codemirror/addons/search/match-highlighter.js +60 -0
  35. data/vendor/assets/javascripts/codemirror/{utils → addons/search}/search.js +5 -5
  36. data/vendor/assets/javascripts/codemirror/{utils → addons/search}/searchcursor.js +37 -30
  37. data/vendor/assets/javascripts/codemirror/addons/selection/active-line.js +39 -0
  38. data/vendor/assets/javascripts/codemirror/addons/selection/mark-selection.js +34 -0
  39. data/vendor/assets/javascripts/codemirror/keymaps/vim.js +721 -188
  40. data/vendor/assets/javascripts/codemirror/modes/asterisk.js +6 -6
  41. data/vendor/assets/javascripts/codemirror/modes/clike.js +14 -14
  42. data/vendor/assets/javascripts/codemirror/modes/clojure.js +23 -7
  43. data/vendor/assets/javascripts/codemirror/modes/coffeescript.js +2 -2
  44. data/vendor/assets/javascripts/codemirror/modes/css.js +337 -235
  45. data/vendor/assets/javascripts/codemirror/modes/ecl.js +12 -12
  46. data/vendor/assets/javascripts/codemirror/modes/erlang.js +1 -1
  47. data/vendor/assets/javascripts/codemirror/modes/gas.js +326 -0
  48. data/vendor/assets/javascripts/codemirror/modes/gfm.js +1 -0
  49. data/vendor/assets/javascripts/codemirror/modes/haskell.js +26 -26
  50. data/vendor/assets/javascripts/codemirror/modes/haxe.js +17 -17
  51. data/vendor/assets/javascripts/codemirror/modes/htmlembedded.js +6 -6
  52. data/vendor/assets/javascripts/codemirror/modes/htmlmixed.js +43 -23
  53. data/vendor/assets/javascripts/codemirror/modes/javascript.js +78 -33
  54. data/vendor/assets/javascripts/codemirror/modes/jinja2.js +2 -2
  55. data/vendor/assets/javascripts/codemirror/modes/less.js +38 -38
  56. data/vendor/assets/javascripts/codemirror/modes/livescript.js +267 -0
  57. data/vendor/assets/javascripts/codemirror/modes/lua.js +7 -7
  58. data/vendor/assets/javascripts/codemirror/modes/markdown.js +108 -57
  59. data/vendor/assets/javascripts/codemirror/modes/mirc.js +177 -0
  60. data/vendor/assets/javascripts/codemirror/modes/ntriples.js +22 -22
  61. data/vendor/assets/javascripts/codemirror/modes/ocaml.js +1 -1
  62. data/vendor/assets/javascripts/codemirror/modes/perl.js +791 -791
  63. data/vendor/assets/javascripts/codemirror/modes/php.js +1 -1
  64. data/vendor/assets/javascripts/codemirror/modes/pig.js +163 -163
  65. data/vendor/assets/javascripts/codemirror/modes/python.js +31 -31
  66. data/vendor/assets/javascripts/codemirror/modes/q.js +124 -0
  67. data/vendor/assets/javascripts/codemirror/modes/rst.js +486 -250
  68. data/vendor/assets/javascripts/codemirror/modes/sass.js +3 -3
  69. data/vendor/assets/javascripts/codemirror/modes/scss_test.js +80 -0
  70. data/vendor/assets/javascripts/codemirror/modes/shell.js +2 -2
  71. data/vendor/assets/javascripts/codemirror/modes/sieve.js +10 -10
  72. data/vendor/assets/javascripts/codemirror/modes/smalltalk.js +129 -129
  73. data/vendor/assets/javascripts/codemirror/modes/smarty.js +3 -3
  74. data/vendor/assets/javascripts/codemirror/modes/sparql.js +1 -1
  75. data/vendor/assets/javascripts/codemirror/modes/sql.js +23 -23
  76. data/vendor/assets/javascripts/codemirror/modes/stex.js +192 -121
  77. data/vendor/assets/javascripts/codemirror/modes/tcl.js +131 -0
  78. data/vendor/assets/javascripts/codemirror/modes/test.js +64 -0
  79. data/vendor/assets/javascripts/codemirror/modes/tiddlywiki.js +345 -345
  80. data/vendor/assets/javascripts/codemirror/modes/tiki.js +297 -298
  81. data/vendor/assets/javascripts/codemirror/modes/turtle.js +145 -0
  82. data/vendor/assets/javascripts/codemirror/modes/vb.js +31 -32
  83. data/vendor/assets/javascripts/codemirror/modes/vbscript.js +4 -4
  84. data/vendor/assets/javascripts/codemirror/modes/xml.js +10 -6
  85. data/vendor/assets/javascripts/codemirror/modes/xquery.js +55 -55
  86. data/vendor/assets/javascripts/codemirror/modes/yaml.js +90 -90
  87. data/vendor/assets/javascripts/codemirror/modes/z80.js +82 -110
  88. data/vendor/assets/javascripts/codemirror.js +1914 -1115
  89. data/vendor/assets/stylesheets/codemirror/{utils → addons/dialog}/dialog.css +0 -0
  90. data/vendor/assets/stylesheets/codemirror/addons/hint/show-hint.css +38 -0
  91. data/vendor/assets/stylesheets/codemirror/addons/lint/lint.css +96 -0
  92. data/vendor/assets/stylesheets/codemirror/modes/tiki.css +2 -2
  93. data/vendor/assets/stylesheets/codemirror/themes/ambiance-mobile.css +0 -1
  94. data/vendor/assets/stylesheets/codemirror/themes/ambiance.css +0 -1
  95. data/vendor/assets/stylesheets/codemirror/themes/eclipse.css +2 -2
  96. data/vendor/assets/stylesheets/codemirror/themes/erlang-dark.css +5 -5
  97. data/vendor/assets/stylesheets/codemirror/themes/midnight.css +52 -0
  98. data/vendor/assets/stylesheets/codemirror/themes/xq-light.css +43 -0
  99. data/vendor/assets/stylesheets/codemirror.css +16 -10
  100. metadata +60 -52
  101. data/vendor/assets/javascripts/codemirror/modes/mysql.js +0 -203
  102. data/vendor/assets/javascripts/codemirror/modes/plsql.js +0 -216
  103. data/vendor/assets/javascripts/codemirror/utils/collapserange.js +0 -68
  104. data/vendor/assets/javascripts/codemirror/utils/continuelist.js +0 -28
  105. data/vendor/assets/javascripts/codemirror/utils/foldcode.js +0 -183
  106. data/vendor/assets/javascripts/codemirror/utils/formatting.js +0 -114
  107. data/vendor/assets/javascripts/codemirror/utils/match-highlighter.js +0 -46
  108. data/vendor/assets/javascripts/codemirror/utils/simple-hint.js +0 -102
  109. data/vendor/assets/stylesheets/codemirror/utils/simple-hint.css +0 -16
@@ -1,113 +1,85 @@
1
- CodeMirror.defineMode('z80', function()
2
- {
3
- var keywords1 = /^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i;
4
- var keywords2 = /^(call|j[pr]|ret[in]?)\b/i;
5
- var keywords3 = /^b_?(call|jump)\b/i;
6
- var variables1 = /^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i;
7
- var variables2 = /^(n?[zc]|p[oe]?|m)\b/i;
8
- var errors = /^([hl][xy]|i[xy][hl]|slia|sll)\b/i;
9
- var numbers = /^([\da-f]+h|[0-7]+o|[01]+b|\d+)\b/i;
10
-
11
- return {startState: function()
12
- {
13
- return {context: 0};
14
- }, token: function(stream, state)
15
- {
16
- if (!stream.column())
17
- state.context = 0;
18
-
19
- if (stream.eatSpace())
20
- return null;
21
-
22
- var w;
23
-
24
- if (stream.eatWhile(/\w/))
25
- {
26
- w = stream.current();
27
-
28
- if (stream.indentation())
29
- {
30
- if (state.context == 1 && variables1.test(w))
31
- return 'variable-2';
32
-
33
- if (state.context == 2 && variables2.test(w))
34
- return 'variable-3';
35
-
36
- if (keywords1.test(w))
37
- {
38
- state.context = 1;
39
- return 'keyword';
40
- }
41
- else if (keywords2.test(w))
42
- {
43
- state.context = 2;
44
- return 'keyword';
45
- }
46
- else if (keywords3.test(w))
47
- {
48
- state.context = 3;
49
- return 'keyword';
50
- }
51
-
52
- if (errors.test(w))
53
- return 'error';
54
- }
55
- else if (numbers.test(w))
56
- {
57
- return 'number';
58
- }
59
- else
60
- {
61
- return null;
62
- }
63
- }
64
- else if (stream.eat(';'))
65
- {
66
- stream.skipToEnd();
67
- return 'comment';
68
- }
69
- else if (stream.eat('"'))
70
- {
71
- while (w = stream.next())
72
- {
73
- if (w == '"')
74
- break;
75
-
76
- if (w == '\\')
77
- stream.next();
78
- }
79
-
80
- return 'string';
81
- }
82
- else if (stream.eat('\''))
83
- {
84
- if (stream.match(/\\?.'/))
85
- return 'number';
86
- }
87
- else if (stream.eat('.') || stream.sol() && stream.eat('#'))
88
- {
89
- state.context = 4;
90
-
91
- if (stream.eatWhile(/\w/))
92
- return 'def';
93
- }
94
- else if (stream.eat('$'))
95
- {
96
- if (stream.eatWhile(/[\da-f]/i))
97
- return 'number';
98
- }
99
- else if (stream.eat('%'))
100
- {
101
- if (stream.eatWhile(/[01]/))
102
- return 'number';
103
- }
104
- else
105
- {
106
- stream.next();
107
- }
108
-
109
- return null;
110
- }};
1
+ CodeMirror.defineMode('z80', function() {
2
+ var keywords1 = /^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i;
3
+ var keywords2 = /^(call|j[pr]|ret[in]?)\b/i;
4
+ var keywords3 = /^b_?(call|jump)\b/i;
5
+ var variables1 = /^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i;
6
+ var variables2 = /^(n?[zc]|p[oe]?|m)\b/i;
7
+ var errors = /^([hl][xy]|i[xy][hl]|slia|sll)\b/i;
8
+ var numbers = /^([\da-f]+h|[0-7]+o|[01]+b|\d+)\b/i;
9
+
10
+ return {
11
+ startState: function() {
12
+ return {context: 0};
13
+ },
14
+ token: function(stream, state) {
15
+ if (!stream.column())
16
+ state.context = 0;
17
+
18
+ if (stream.eatSpace())
19
+ return null;
20
+
21
+ var w;
22
+
23
+ if (stream.eatWhile(/\w/)) {
24
+ w = stream.current();
25
+
26
+ if (stream.indentation()) {
27
+ if (state.context == 1 && variables1.test(w))
28
+ return 'variable-2';
29
+
30
+ if (state.context == 2 && variables2.test(w))
31
+ return 'variable-3';
32
+
33
+ if (keywords1.test(w)) {
34
+ state.context = 1;
35
+ return 'keyword';
36
+ } else if (keywords2.test(w)) {
37
+ state.context = 2;
38
+ return 'keyword';
39
+ } else if (keywords3.test(w)) {
40
+ state.context = 3;
41
+ return 'keyword';
42
+ }
43
+
44
+ if (errors.test(w))
45
+ return 'error';
46
+ } else if (numbers.test(w)) {
47
+ return 'number';
48
+ } else {
49
+ return null;
50
+ }
51
+ } else if (stream.eat(';')) {
52
+ stream.skipToEnd();
53
+ return 'comment';
54
+ } else if (stream.eat('"')) {
55
+ while (w = stream.next()) {
56
+ if (w == '"')
57
+ break;
58
+
59
+ if (w == '\\')
60
+ stream.next();
61
+ }
62
+ return 'string';
63
+ } else if (stream.eat('\'')) {
64
+ if (stream.match(/\\?.'/))
65
+ return 'number';
66
+ } else if (stream.eat('.') || stream.sol() && stream.eat('#')) {
67
+ state.context = 4;
68
+
69
+ if (stream.eatWhile(/\w/))
70
+ return 'def';
71
+ } else if (stream.eat('$')) {
72
+ if (stream.eatWhile(/[\da-f]/i))
73
+ return 'number';
74
+ } else if (stream.eat('%')) {
75
+ if (stream.eatWhile(/[01]/))
76
+ return 'number';
77
+ } else {
78
+ stream.next();
79
+ }
80
+ return null;
81
+ }
82
+ };
111
83
  });
112
84
 
113
85
  CodeMirror.defineMIME("text/x-z80", "z80");