fluentd-ui 0.3.12 → 0.3.13

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fluentd-ui might be problematic. Click here for more details.

Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +4 -0
  3. data/Gemfile.lock +1 -1
  4. data/app/assets/javascripts/application.js +2 -0
  5. data/app/assets/javascripts/codemirror.js +29 -0
  6. data/app/assets/javascripts/codemirror_fluentd.js +59 -0
  7. data/app/assets/stylesheets/application.css +6 -0
  8. data/app/views/fluentd/settings/edit.html.haml +1 -1
  9. data/app/views/shared/vue/_setting.html.erb +1 -1
  10. data/bower.json +2 -1
  11. data/lib/fluentd-ui/version.rb +1 -1
  12. data/spec/features/source_and_output_spec.rb +16 -6
  13. data/vendor/assets/javascripts/bower/codemirror/.bower.json +29 -0
  14. data/vendor/assets/javascripts/bower/codemirror/AUTHORS +423 -0
  15. data/vendor/assets/javascripts/bower/codemirror/CONTRIBUTING.md +76 -0
  16. data/vendor/assets/javascripts/bower/codemirror/LICENSE +19 -0
  17. data/vendor/assets/javascripts/bower/codemirror/README.md +11 -0
  18. data/vendor/assets/javascripts/bower/codemirror/addon/comment/comment.js +183 -0
  19. data/vendor/assets/javascripts/bower/codemirror/addon/comment/continuecomment.js +85 -0
  20. data/vendor/assets/javascripts/bower/codemirror/addon/dialog/dialog.css +32 -0
  21. data/vendor/assets/javascripts/bower/codemirror/addon/dialog/dialog.js +155 -0
  22. data/vendor/assets/javascripts/bower/codemirror/addon/display/fullscreen.css +6 -0
  23. data/vendor/assets/javascripts/bower/codemirror/addon/display/fullscreen.js +41 -0
  24. data/vendor/assets/javascripts/bower/codemirror/addon/display/panel.js +94 -0
  25. data/vendor/assets/javascripts/bower/codemirror/addon/display/placeholder.js +58 -0
  26. data/vendor/assets/javascripts/bower/codemirror/addon/display/rulers.js +64 -0
  27. data/vendor/assets/javascripts/bower/codemirror/addon/edit/closebrackets.js +159 -0
  28. data/vendor/assets/javascripts/bower/codemirror/addon/edit/closetag.js +159 -0
  29. data/vendor/assets/javascripts/bower/codemirror/addon/edit/continuelist.js +51 -0
  30. data/vendor/assets/javascripts/bower/codemirror/addon/edit/matchbrackets.js +120 -0
  31. data/vendor/assets/javascripts/bower/codemirror/addon/edit/matchtags.js +66 -0
  32. data/vendor/assets/javascripts/bower/codemirror/addon/edit/trailingspace.js +27 -0
  33. data/vendor/assets/javascripts/bower/codemirror/addon/fold/brace-fold.js +105 -0
  34. data/vendor/assets/javascripts/bower/codemirror/addon/fold/comment-fold.js +57 -0
  35. data/vendor/assets/javascripts/bower/codemirror/addon/fold/foldcode.js +145 -0
  36. data/vendor/assets/javascripts/bower/codemirror/addon/fold/foldgutter.css +20 -0
  37. data/vendor/assets/javascripts/bower/codemirror/addon/fold/foldgutter.js +134 -0
  38. data/vendor/assets/javascripts/bower/codemirror/addon/fold/indent-fold.js +44 -0
  39. data/vendor/assets/javascripts/bower/codemirror/addon/fold/markdown-fold.js +49 -0
  40. data/vendor/assets/javascripts/bower/codemirror/addon/fold/xml-fold.js +182 -0
  41. data/vendor/assets/javascripts/bower/codemirror/addon/hint/anyword-hint.js +41 -0
  42. data/vendor/assets/javascripts/bower/codemirror/addon/hint/css-hint.js +56 -0
  43. data/vendor/assets/javascripts/bower/codemirror/addon/hint/html-hint.js +348 -0
  44. data/vendor/assets/javascripts/bower/codemirror/addon/hint/javascript-hint.js +146 -0
  45. data/vendor/assets/javascripts/bower/codemirror/addon/hint/show-hint.css +38 -0
  46. data/vendor/assets/javascripts/bower/codemirror/addon/hint/show-hint.js +389 -0
  47. data/vendor/assets/javascripts/bower/codemirror/addon/hint/sql-hint.js +197 -0
  48. data/vendor/assets/javascripts/bower/codemirror/addon/hint/xml-hint.js +110 -0
  49. data/vendor/assets/javascripts/bower/codemirror/addon/lint/coffeescript-lint.js +41 -0
  50. data/vendor/assets/javascripts/bower/codemirror/addon/lint/css-lint.js +35 -0
  51. data/vendor/assets/javascripts/bower/codemirror/addon/lint/javascript-lint.js +136 -0
  52. data/vendor/assets/javascripts/bower/codemirror/addon/lint/json-lint.js +31 -0
  53. data/vendor/assets/javascripts/bower/codemirror/addon/lint/lint.css +73 -0
  54. data/vendor/assets/javascripts/bower/codemirror/addon/lint/lint.js +204 -0
  55. data/vendor/assets/javascripts/bower/codemirror/addon/lint/yaml-lint.js +28 -0
  56. data/vendor/assets/javascripts/bower/codemirror/addon/merge/merge.css +112 -0
  57. data/vendor/assets/javascripts/bower/codemirror/addon/merge/merge.js +643 -0
  58. data/vendor/assets/javascripts/bower/codemirror/addon/mode/loadmode.js +64 -0
  59. data/vendor/assets/javascripts/bower/codemirror/addon/mode/multiplex.js +118 -0
  60. data/vendor/assets/javascripts/bower/codemirror/addon/mode/multiplex_test.js +33 -0
  61. data/vendor/assets/javascripts/bower/codemirror/addon/mode/overlay.js +85 -0
  62. data/vendor/assets/javascripts/bower/codemirror/addon/mode/simple.js +213 -0
  63. data/vendor/assets/javascripts/bower/codemirror/addon/runmode/colorize.js +40 -0
  64. data/vendor/assets/javascripts/bower/codemirror/addon/runmode/runmode-standalone.js +157 -0
  65. data/vendor/assets/javascripts/bower/codemirror/addon/runmode/runmode.js +72 -0
  66. data/vendor/assets/javascripts/bower/codemirror/addon/runmode/runmode.node.js +120 -0
  67. data/vendor/assets/javascripts/bower/codemirror/addon/scroll/annotatescrollbar.js +76 -0
  68. data/vendor/assets/javascripts/bower/codemirror/addon/scroll/scrollpastend.js +46 -0
  69. data/vendor/assets/javascripts/bower/codemirror/addon/scroll/simplescrollbars.css +66 -0
  70. data/vendor/assets/javascripts/bower/codemirror/addon/scroll/simplescrollbars.js +139 -0
  71. data/vendor/assets/javascripts/bower/codemirror/addon/search/match-highlighter.js +128 -0
  72. data/vendor/assets/javascripts/bower/codemirror/addon/search/matchesonscrollbar.css +8 -0
  73. data/vendor/assets/javascripts/bower/codemirror/addon/search/matchesonscrollbar.js +90 -0
  74. data/vendor/assets/javascripts/bower/codemirror/addon/search/search.js +164 -0
  75. data/vendor/assets/javascripts/bower/codemirror/addon/search/searchcursor.js +189 -0
  76. data/vendor/assets/javascripts/bower/codemirror/addon/selection/active-line.js +71 -0
  77. data/vendor/assets/javascripts/bower/codemirror/addon/selection/mark-selection.js +118 -0
  78. data/vendor/assets/javascripts/bower/codemirror/addon/tern/tern.css +86 -0
  79. data/vendor/assets/javascripts/bower/codemirror/addon/tern/tern.js +670 -0
  80. data/vendor/assets/javascripts/bower/codemirror/addon/tern/worker.js +44 -0
  81. data/vendor/assets/javascripts/bower/codemirror/addon/wrap/hardwrap.js +139 -0
  82. data/vendor/assets/javascripts/bower/codemirror/bower.json +16 -0
  83. data/vendor/assets/javascripts/bower/codemirror/keymap/emacs.js +411 -0
  84. data/vendor/assets/javascripts/bower/codemirror/keymap/sublime.js +540 -0
  85. data/vendor/assets/javascripts/bower/codemirror/keymap/vim.js +4901 -0
  86. data/vendor/assets/javascripts/bower/codemirror/lib/codemirror.css +309 -0
  87. data/vendor/assets/javascripts/bower/codemirror/lib/codemirror.js +8029 -0
  88. data/vendor/assets/javascripts/bower/codemirror/mode/apl/apl.js +175 -0
  89. data/vendor/assets/javascripts/bower/codemirror/mode/asterisk/asterisk.js +198 -0
  90. data/vendor/assets/javascripts/bower/codemirror/mode/clike/clike.js +489 -0
  91. data/vendor/assets/javascripts/bower/codemirror/mode/clike/scala.html +767 -0
  92. data/vendor/assets/javascripts/bower/codemirror/mode/clojure/clojure.js +243 -0
  93. data/vendor/assets/javascripts/bower/codemirror/mode/cobol/cobol.js +255 -0
  94. data/vendor/assets/javascripts/bower/codemirror/mode/coffeescript/coffeescript.js +369 -0
  95. data/vendor/assets/javascripts/bower/codemirror/mode/commonlisp/commonlisp.js +122 -0
  96. data/vendor/assets/javascripts/bower/codemirror/mode/css/css.js +717 -0
  97. data/vendor/assets/javascripts/bower/codemirror/mode/css/less.html +152 -0
  98. data/vendor/assets/javascripts/bower/codemirror/mode/css/less_test.js +51 -0
  99. data/vendor/assets/javascripts/bower/codemirror/mode/css/scss.html +157 -0
  100. data/vendor/assets/javascripts/bower/codemirror/mode/css/scss_test.js +110 -0
  101. data/vendor/assets/javascripts/bower/codemirror/mode/css/test.js +135 -0
  102. data/vendor/assets/javascripts/bower/codemirror/mode/cypher/cypher.js +146 -0
  103. data/vendor/assets/javascripts/bower/codemirror/mode/d/d.js +218 -0
  104. data/vendor/assets/javascripts/bower/codemirror/mode/dart/dart.js +50 -0
  105. data/vendor/assets/javascripts/bower/codemirror/mode/diff/diff.js +47 -0
  106. data/vendor/assets/javascripts/bower/codemirror/mode/django/django.js +67 -0
  107. data/vendor/assets/javascripts/bower/codemirror/mode/dockerfile/dockerfile.js +76 -0
  108. data/vendor/assets/javascripts/bower/codemirror/mode/dtd/dtd.js +142 -0
  109. data/vendor/assets/javascripts/bower/codemirror/mode/dylan/dylan.js +299 -0
  110. data/vendor/assets/javascripts/bower/codemirror/mode/ebnf/ebnf.js +195 -0
  111. data/vendor/assets/javascripts/bower/codemirror/mode/ecl/ecl.js +207 -0
  112. data/vendor/assets/javascripts/bower/codemirror/mode/eiffel/eiffel.js +162 -0
  113. data/vendor/assets/javascripts/bower/codemirror/mode/erlang/erlang.js +622 -0
  114. data/vendor/assets/javascripts/bower/codemirror/mode/fortran/fortran.js +188 -0
  115. data/vendor/assets/javascripts/bower/codemirror/mode/gas/gas.js +345 -0
  116. data/vendor/assets/javascripts/bower/codemirror/mode/gfm/gfm.js +123 -0
  117. data/vendor/assets/javascripts/bower/codemirror/mode/gfm/test.js +213 -0
  118. data/vendor/assets/javascripts/bower/codemirror/mode/gherkin/gherkin.js +178 -0
  119. data/vendor/assets/javascripts/bower/codemirror/mode/go/go.js +184 -0
  120. data/vendor/assets/javascripts/bower/codemirror/mode/groovy/groovy.js +226 -0
  121. data/vendor/assets/javascripts/bower/codemirror/mode/haml/haml.js +159 -0
  122. data/vendor/assets/javascripts/bower/codemirror/mode/haml/test.js +97 -0
  123. data/vendor/assets/javascripts/bower/codemirror/mode/haskell/haskell.js +267 -0
  124. data/vendor/assets/javascripts/bower/codemirror/mode/haxe/haxe.js +518 -0
  125. data/vendor/assets/javascripts/bower/codemirror/mode/htmlembedded/htmlembedded.js +86 -0
  126. data/vendor/assets/javascripts/bower/codemirror/mode/htmlmixed/htmlmixed.js +121 -0
  127. data/vendor/assets/javascripts/bower/codemirror/mode/http/http.js +113 -0
  128. data/vendor/assets/javascripts/bower/codemirror/mode/idl/idl.js +290 -0
  129. data/vendor/assets/javascripts/bower/codemirror/mode/jade/jade.js +590 -0
  130. data/vendor/assets/javascripts/bower/codemirror/mode/javascript/javascript.js +686 -0
  131. data/vendor/assets/javascripts/bower/codemirror/mode/javascript/json-ld.html +72 -0
  132. data/vendor/assets/javascripts/bower/codemirror/mode/javascript/test.js +200 -0
  133. data/vendor/assets/javascripts/bower/codemirror/mode/javascript/typescript.html +61 -0
  134. data/vendor/assets/javascripts/bower/codemirror/mode/jinja2/jinja2.js +142 -0
  135. data/vendor/assets/javascripts/bower/codemirror/mode/julia/julia.js +301 -0
  136. data/vendor/assets/javascripts/bower/codemirror/mode/kotlin/kotlin.js +280 -0
  137. data/vendor/assets/javascripts/bower/codemirror/mode/livescript/livescript.js +280 -0
  138. data/vendor/assets/javascripts/bower/codemirror/mode/lua/lua.js +159 -0
  139. data/vendor/assets/javascripts/bower/codemirror/mode/markdown/markdown.js +765 -0
  140. data/vendor/assets/javascripts/bower/codemirror/mode/markdown/test.js +754 -0
  141. data/vendor/assets/javascripts/bower/codemirror/mode/meta.js +165 -0
  142. data/vendor/assets/javascripts/bower/codemirror/mode/mirc/mirc.js +193 -0
  143. data/vendor/assets/javascripts/bower/codemirror/mode/mllike/mllike.js +205 -0
  144. data/vendor/assets/javascripts/bower/codemirror/mode/modelica/modelica.js +245 -0
  145. data/vendor/assets/javascripts/bower/codemirror/mode/nginx/nginx.js +178 -0
  146. data/vendor/assets/javascripts/bower/codemirror/mode/ntriples/ntriples.js +186 -0
  147. data/vendor/assets/javascripts/bower/codemirror/mode/octave/octave.js +135 -0
  148. data/vendor/assets/javascripts/bower/codemirror/mode/pascal/pascal.js +109 -0
  149. data/vendor/assets/javascripts/bower/codemirror/mode/pegjs/pegjs.js +114 -0
  150. data/vendor/assets/javascripts/bower/codemirror/mode/perl/perl.js +832 -0
  151. data/vendor/assets/javascripts/bower/codemirror/mode/php/php.js +226 -0
  152. data/vendor/assets/javascripts/bower/codemirror/mode/php/test.js +154 -0
  153. data/vendor/assets/javascripts/bower/codemirror/mode/pig/pig.js +188 -0
  154. data/vendor/assets/javascripts/bower/codemirror/mode/properties/properties.js +78 -0
  155. data/vendor/assets/javascripts/bower/codemirror/mode/puppet/puppet.js +220 -0
  156. data/vendor/assets/javascripts/bower/codemirror/mode/python/python.js +359 -0
  157. data/vendor/assets/javascripts/bower/codemirror/mode/q/q.js +139 -0
  158. data/vendor/assets/javascripts/bower/codemirror/mode/r/r.js +162 -0
  159. data/vendor/assets/javascripts/bower/codemirror/mode/rpm/rpm.js +101 -0
  160. data/vendor/assets/javascripts/bower/codemirror/mode/rst/rst.js +557 -0
  161. data/vendor/assets/javascripts/bower/codemirror/mode/ruby/ruby.js +285 -0
  162. data/vendor/assets/javascripts/bower/codemirror/mode/ruby/test.js +14 -0
  163. data/vendor/assets/javascripts/bower/codemirror/mode/rust/rust.js +451 -0
  164. data/vendor/assets/javascripts/bower/codemirror/mode/sass/sass.js +327 -0
  165. data/vendor/assets/javascripts/bower/codemirror/mode/scheme/scheme.js +248 -0
  166. data/vendor/assets/javascripts/bower/codemirror/mode/shell/shell.js +139 -0
  167. data/vendor/assets/javascripts/bower/codemirror/mode/shell/test.js +58 -0
  168. data/vendor/assets/javascripts/bower/codemirror/mode/sieve/sieve.js +193 -0
  169. data/vendor/assets/javascripts/bower/codemirror/mode/slim/slim.js +575 -0
  170. data/vendor/assets/javascripts/bower/codemirror/mode/slim/test.js +96 -0
  171. data/vendor/assets/javascripts/bower/codemirror/mode/smalltalk/smalltalk.js +168 -0
  172. data/vendor/assets/javascripts/bower/codemirror/mode/smarty/smarty.js +221 -0
  173. data/vendor/assets/javascripts/bower/codemirror/mode/smartymixed/smartymixed.js +197 -0
  174. data/vendor/assets/javascripts/bower/codemirror/mode/solr/solr.js +104 -0
  175. data/vendor/assets/javascripts/bower/codemirror/mode/soy/soy.js +198 -0
  176. data/vendor/assets/javascripts/bower/codemirror/mode/sparql/sparql.js +174 -0
  177. data/vendor/assets/javascripts/bower/codemirror/mode/spreadsheet/spreadsheet.js +109 -0
  178. data/vendor/assets/javascripts/bower/codemirror/mode/sql/sql.js +391 -0
  179. data/vendor/assets/javascripts/bower/codemirror/mode/stex/stex.js +251 -0
  180. data/vendor/assets/javascripts/bower/codemirror/mode/stex/test.js +123 -0
  181. data/vendor/assets/javascripts/bower/codemirror/mode/tcl/tcl.js +147 -0
  182. data/vendor/assets/javascripts/bower/codemirror/mode/textile/test.js +417 -0
  183. data/vendor/assets/javascripts/bower/codemirror/mode/textile/textile.js +469 -0
  184. data/vendor/assets/javascripts/bower/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
  185. data/vendor/assets/javascripts/bower/codemirror/mode/tiddlywiki/tiddlywiki.js +369 -0
  186. data/vendor/assets/javascripts/bower/codemirror/mode/tiki/tiki.css +26 -0
  187. data/vendor/assets/javascripts/bower/codemirror/mode/tiki/tiki.js +323 -0
  188. data/vendor/assets/javascripts/bower/codemirror/mode/toml/toml.js +88 -0
  189. data/vendor/assets/javascripts/bower/codemirror/mode/tornado/tornado.js +68 -0
  190. data/vendor/assets/javascripts/bower/codemirror/mode/turtle/turtle.js +162 -0
  191. data/vendor/assets/javascripts/bower/codemirror/mode/vb/vb.js +274 -0
  192. data/vendor/assets/javascripts/bower/codemirror/mode/vbscript/vbscript.js +350 -0
  193. data/vendor/assets/javascripts/bower/codemirror/mode/velocity/velocity.js +201 -0
  194. data/vendor/assets/javascripts/bower/codemirror/mode/verilog/test.js +273 -0
  195. data/vendor/assets/javascripts/bower/codemirror/mode/verilog/verilog.js +364 -0
  196. data/vendor/assets/javascripts/bower/codemirror/mode/xml/test.js +51 -0
  197. data/vendor/assets/javascripts/bower/codemirror/mode/xml/xml.js +384 -0
  198. data/vendor/assets/javascripts/bower/codemirror/mode/xquery/test.js +67 -0
  199. data/vendor/assets/javascripts/bower/codemirror/mode/xquery/xquery.js +447 -0
  200. data/vendor/assets/javascripts/bower/codemirror/mode/yaml/yaml.js +117 -0
  201. data/vendor/assets/javascripts/bower/codemirror/mode/z80/z80.js +100 -0
  202. data/vendor/assets/javascripts/bower/codemirror/theme/3024-day.css +38 -0
  203. data/vendor/assets/javascripts/bower/codemirror/theme/3024-night.css +37 -0
  204. data/vendor/assets/javascripts/bower/codemirror/theme/ambiance-mobile.css +5 -0
  205. data/vendor/assets/javascripts/bower/codemirror/theme/ambiance.css +77 -0
  206. data/vendor/assets/javascripts/bower/codemirror/theme/base16-dark.css +36 -0
  207. data/vendor/assets/javascripts/bower/codemirror/theme/base16-light.css +36 -0
  208. data/vendor/assets/javascripts/bower/codemirror/theme/blackboard.css +30 -0
  209. data/vendor/assets/javascripts/bower/codemirror/theme/cobalt.css +23 -0
  210. data/vendor/assets/javascripts/bower/codemirror/theme/eclipse.css +23 -0
  211. data/vendor/assets/javascripts/bower/codemirror/theme/elegant.css +13 -0
  212. data/vendor/assets/javascripts/bower/codemirror/theme/erlang-dark.css +32 -0
  213. data/vendor/assets/javascripts/bower/codemirror/theme/lesser-dark.css +45 -0
  214. data/vendor/assets/javascripts/bower/codemirror/theme/mbo.css +35 -0
  215. data/vendor/assets/javascripts/bower/codemirror/theme/mdn-like.css +44 -0
  216. data/vendor/assets/javascripts/bower/codemirror/theme/midnight.css +45 -0
  217. data/vendor/assets/javascripts/bower/codemirror/theme/monokai.css +31 -0
  218. data/vendor/assets/javascripts/bower/codemirror/theme/neat.css +12 -0
  219. data/vendor/assets/javascripts/bower/codemirror/theme/neo.css +43 -0
  220. data/vendor/assets/javascripts/bower/codemirror/theme/night.css +26 -0
  221. data/vendor/assets/javascripts/bower/codemirror/theme/paraiso-dark.css +36 -0
  222. data/vendor/assets/javascripts/bower/codemirror/theme/paraiso-light.css +36 -0
  223. data/vendor/assets/javascripts/bower/codemirror/theme/pastel-on-dark.css +50 -0
  224. data/vendor/assets/javascripts/bower/codemirror/theme/rubyblue.css +23 -0
  225. data/vendor/assets/javascripts/bower/codemirror/theme/solarized.css +165 -0
  226. data/vendor/assets/javascripts/bower/codemirror/theme/the-matrix.css +28 -0
  227. data/vendor/assets/javascripts/bower/codemirror/theme/tomorrow-night-bright.css +35 -0
  228. data/vendor/assets/javascripts/bower/codemirror/theme/tomorrow-night-eighties.css +36 -0
  229. data/vendor/assets/javascripts/bower/codemirror/theme/twilight.css +30 -0
  230. data/vendor/assets/javascripts/bower/codemirror/theme/vibrant-ink.css +32 -0
  231. data/vendor/assets/javascripts/bower/codemirror/theme/xq-dark.css +51 -0
  232. data/vendor/assets/javascripts/bower/codemirror/theme/xq-light.css +43 -0
  233. data/vendor/assets/javascripts/bower/codemirror/theme/zenburn.css +37 -0
  234. metadata +225 -2
@@ -0,0 +1,50 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"), require("../clike/clike"));
7
+ else if (typeof define == "function" && define.amd) // AMD
8
+ define(["../../lib/codemirror", "../clike/clike"], mod);
9
+ else // Plain browser env
10
+ mod(CodeMirror);
11
+ })(function(CodeMirror) {
12
+ "use strict";
13
+
14
+ var keywords = ("this super static final const abstract class extends external factory " +
15
+ "implements get native operator set typedef with enum throw rethrow " +
16
+ "assert break case continue default in return new deferred async await " +
17
+ "try catch finally do else for if switch while import library export " +
18
+ "part of show hide is").split(" ");
19
+ var blockKeywords = "try catch finally do else for if switch while".split(" ");
20
+ var atoms = "true false null".split(" ");
21
+ var builtins = "void bool num int double dynamic var String".split(" ");
22
+
23
+ function set(words) {
24
+ var obj = {};
25
+ for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
26
+ return obj;
27
+ }
28
+
29
+ CodeMirror.defineMIME("application/dart", {
30
+ name: "clike",
31
+ keywords: set(keywords),
32
+ multiLineStrings: true,
33
+ blockKeywords: set(blockKeywords),
34
+ builtin: set(builtins),
35
+ atoms: set(atoms),
36
+ hooks: {
37
+ "@": function(stream) {
38
+ stream.eatWhile(/[\w\$_]/);
39
+ return "meta";
40
+ }
41
+ }
42
+ });
43
+
44
+ CodeMirror.registerHelper("hintWords", "application/dart", keywords.concat(atoms).concat(builtins));
45
+
46
+ // This is needed to make loading through meta.js work.
47
+ CodeMirror.defineMode("dart", function(conf) {
48
+ return CodeMirror.getMode(conf, "application/dart");
49
+ }, "clike");
50
+ });
@@ -0,0 +1,47 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"));
7
+ else if (typeof define == "function" && define.amd) // AMD
8
+ define(["../../lib/codemirror"], mod);
9
+ else // Plain browser env
10
+ mod(CodeMirror);
11
+ })(function(CodeMirror) {
12
+ "use strict";
13
+
14
+ CodeMirror.defineMode("diff", function() {
15
+
16
+ var TOKEN_NAMES = {
17
+ '+': 'positive',
18
+ '-': 'negative',
19
+ '@': 'meta'
20
+ };
21
+
22
+ return {
23
+ token: function(stream) {
24
+ var tw_pos = stream.string.search(/[\t ]+?$/);
25
+
26
+ if (!stream.sol() || tw_pos === 0) {
27
+ stream.skipToEnd();
28
+ return ("error " + (
29
+ TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, '');
30
+ }
31
+
32
+ var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd();
33
+
34
+ if (tw_pos === -1) {
35
+ stream.skipToEnd();
36
+ } else {
37
+ stream.pos = tw_pos;
38
+ }
39
+
40
+ return token_name;
41
+ }
42
+ };
43
+ });
44
+
45
+ CodeMirror.defineMIME("text/x-diff", "diff");
46
+
47
+ });
@@ -0,0 +1,67 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"),
7
+ require("../../addon/mode/overlay"));
8
+ else if (typeof define == "function" && define.amd) // AMD
9
+ define(["../../lib/codemirror", "../htmlmixed/htmlmixed",
10
+ "../../addon/mode/overlay"], mod);
11
+ else // Plain browser env
12
+ mod(CodeMirror);
13
+ })(function(CodeMirror) {
14
+ "use strict";
15
+
16
+ CodeMirror.defineMode("django:inner", function() {
17
+ var keywords = ["block", "endblock", "for", "endfor", "in", "true", "false",
18
+ "loop", "none", "self", "super", "if", "endif", "as", "not", "and",
19
+ "else", "import", "with", "endwith", "without", "context", "ifequal", "endifequal",
20
+ "ifnotequal", "endifnotequal", "extends", "include", "load", "length", "comment",
21
+ "endcomment", "empty"];
22
+ keywords = new RegExp("^((" + keywords.join(")|(") + "))\\b");
23
+
24
+ function tokenBase (stream, state) {
25
+ stream.eatWhile(/[^\{]/);
26
+ var ch = stream.next();
27
+ if (ch == "{") {
28
+ if (ch = stream.eat(/\{|%|#/)) {
29
+ state.tokenize = inTag(ch);
30
+ return "tag";
31
+ }
32
+ }
33
+ }
34
+ function inTag (close) {
35
+ if (close == "{") {
36
+ close = "}";
37
+ }
38
+ return function (stream, state) {
39
+ var ch = stream.next();
40
+ if ((ch == close) && stream.eat("}")) {
41
+ state.tokenize = tokenBase;
42
+ return "tag";
43
+ }
44
+ if (stream.match(keywords)) {
45
+ return "keyword";
46
+ }
47
+ return close == "#" ? "comment" : "string";
48
+ };
49
+ }
50
+ return {
51
+ startState: function () {
52
+ return {tokenize: tokenBase};
53
+ },
54
+ token: function (stream, state) {
55
+ return state.tokenize(stream, state);
56
+ }
57
+ };
58
+ });
59
+
60
+ CodeMirror.defineMode("django", function(config) {
61
+ var htmlBase = CodeMirror.getMode(config, "text/html");
62
+ var djangoInner = CodeMirror.getMode(config, "django:inner");
63
+ return CodeMirror.overlayMode(htmlBase, djangoInner);
64
+ });
65
+
66
+ CodeMirror.defineMIME("text/x-django", "django");
67
+ });
@@ -0,0 +1,76 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"), require("../../addon/mode/simple"));
7
+ else if (typeof define == "function" && define.amd) // AMD
8
+ define(["../../lib/codemirror", "../../addon/mode/simple"], mod);
9
+ else // Plain browser env
10
+ mod(CodeMirror);
11
+ })(function(CodeMirror) {
12
+ "use strict";
13
+
14
+ // Collect all Dockerfile directives
15
+ var instructions = ["from", "maintainer", "run", "cmd", "expose", "env",
16
+ "add", "copy", "entrypoint", "volume", "user",
17
+ "workdir", "onbuild"],
18
+ instructionRegex = "(" + instructions.join('|') + ")",
19
+ instructionOnlyLine = new RegExp(instructionRegex + "\\s*$", "i"),
20
+ instructionWithArguments = new RegExp(instructionRegex + "(\\s+)", "i");
21
+
22
+ CodeMirror.defineSimpleMode("dockerfile", {
23
+ start: [
24
+ // Block comment: This is a line starting with a comment
25
+ {
26
+ regex: /#.*$/,
27
+ token: "comment"
28
+ },
29
+ // Highlight an instruction without any arguments (for convenience)
30
+ {
31
+ regex: instructionOnlyLine,
32
+ token: "variable-2"
33
+ },
34
+ // Highlight an instruction followed by arguments
35
+ {
36
+ regex: instructionWithArguments,
37
+ token: ["variable-2", null],
38
+ next: "arguments"
39
+ },
40
+ {
41
+ regex: /./,
42
+ token: null
43
+ }
44
+ ],
45
+ arguments: [
46
+ {
47
+ // Line comment without instruction arguments is an error
48
+ regex: /#.*$/,
49
+ token: "error",
50
+ next: "start"
51
+ },
52
+ {
53
+ regex: /[^#]+\\$/,
54
+ token: null
55
+ },
56
+ {
57
+ // Match everything except for the inline comment
58
+ regex: /[^#]+/,
59
+ token: null,
60
+ next: "start"
61
+ },
62
+ {
63
+ regex: /$/,
64
+ token: null,
65
+ next: "start"
66
+ },
67
+ // Fail safe return to start
68
+ {
69
+ token: null,
70
+ next: "start"
71
+ }
72
+ ]
73
+ });
74
+
75
+ CodeMirror.defineMIME("text/x-dockerfile", "dockerfile");
76
+ });
@@ -0,0 +1,142 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ /*
5
+ DTD mode
6
+ Ported to CodeMirror by Peter Kroon <plakroon@gmail.com>
7
+ Report bugs/issues here: https://github.com/codemirror/CodeMirror/issues
8
+ GitHub: @peterkroon
9
+ */
10
+
11
+ (function(mod) {
12
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
13
+ mod(require("../../lib/codemirror"));
14
+ else if (typeof define == "function" && define.amd) // AMD
15
+ define(["../../lib/codemirror"], mod);
16
+ else // Plain browser env
17
+ mod(CodeMirror);
18
+ })(function(CodeMirror) {
19
+ "use strict";
20
+
21
+ CodeMirror.defineMode("dtd", function(config) {
22
+ var indentUnit = config.indentUnit, type;
23
+ function ret(style, tp) {type = tp; return style;}
24
+
25
+ function tokenBase(stream, state) {
26
+ var ch = stream.next();
27
+
28
+ if (ch == "<" && stream.eat("!") ) {
29
+ if (stream.eatWhile(/[\-]/)) {
30
+ state.tokenize = tokenSGMLComment;
31
+ return tokenSGMLComment(stream, state);
32
+ } else if (stream.eatWhile(/[\w]/)) return ret("keyword", "doindent");
33
+ } else if (ch == "<" && stream.eat("?")) { //xml declaration
34
+ state.tokenize = inBlock("meta", "?>");
35
+ return ret("meta", ch);
36
+ } else if (ch == "#" && stream.eatWhile(/[\w]/)) return ret("atom", "tag");
37
+ else if (ch == "|") return ret("keyword", "seperator");
38
+ else if (ch.match(/[\(\)\[\]\-\.,\+\?>]/)) return ret(null, ch);//if(ch === ">") return ret(null, "endtag"); else
39
+ else if (ch.match(/[\[\]]/)) return ret("rule", ch);
40
+ else if (ch == "\"" || ch == "'") {
41
+ state.tokenize = tokenString(ch);
42
+ return state.tokenize(stream, state);
43
+ } else if (stream.eatWhile(/[a-zA-Z\?\+\d]/)) {
44
+ var sc = stream.current();
45
+ if( sc.substr(sc.length-1,sc.length).match(/\?|\+/) !== null )stream.backUp(1);
46
+ return ret("tag", "tag");
47
+ } else if (ch == "%" || ch == "*" ) return ret("number", "number");
48
+ else {
49
+ stream.eatWhile(/[\w\\\-_%.{,]/);
50
+ return ret(null, null);
51
+ }
52
+ }
53
+
54
+ function tokenSGMLComment(stream, state) {
55
+ var dashes = 0, ch;
56
+ while ((ch = stream.next()) != null) {
57
+ if (dashes >= 2 && ch == ">") {
58
+ state.tokenize = tokenBase;
59
+ break;
60
+ }
61
+ dashes = (ch == "-") ? dashes + 1 : 0;
62
+ }
63
+ return ret("comment", "comment");
64
+ }
65
+
66
+ function tokenString(quote) {
67
+ return function(stream, state) {
68
+ var escaped = false, ch;
69
+ while ((ch = stream.next()) != null) {
70
+ if (ch == quote && !escaped) {
71
+ state.tokenize = tokenBase;
72
+ break;
73
+ }
74
+ escaped = !escaped && ch == "\\";
75
+ }
76
+ return ret("string", "tag");
77
+ };
78
+ }
79
+
80
+ function inBlock(style, terminator) {
81
+ return function(stream, state) {
82
+ while (!stream.eol()) {
83
+ if (stream.match(terminator)) {
84
+ state.tokenize = tokenBase;
85
+ break;
86
+ }
87
+ stream.next();
88
+ }
89
+ return style;
90
+ };
91
+ }
92
+
93
+ return {
94
+ startState: function(base) {
95
+ return {tokenize: tokenBase,
96
+ baseIndent: base || 0,
97
+ stack: []};
98
+ },
99
+
100
+ token: function(stream, state) {
101
+ if (stream.eatSpace()) return null;
102
+ var style = state.tokenize(stream, state);
103
+
104
+ var context = state.stack[state.stack.length-1];
105
+ if (stream.current() == "[" || type === "doindent" || type == "[") state.stack.push("rule");
106
+ else if (type === "endtag") state.stack[state.stack.length-1] = "endtag";
107
+ else if (stream.current() == "]" || type == "]" || (type == ">" && context == "rule")) state.stack.pop();
108
+ else if (type == "[") state.stack.push("[");
109
+ return style;
110
+ },
111
+
112
+ indent: function(state, textAfter) {
113
+ var n = state.stack.length;
114
+
115
+ if( textAfter.match(/\]\s+|\]/) )n=n-1;
116
+ else if(textAfter.substr(textAfter.length-1, textAfter.length) === ">"){
117
+ if(textAfter.substr(0,1) === "<")n;
118
+ else if( type == "doindent" && textAfter.length > 1 )n;
119
+ else if( type == "doindent")n--;
120
+ else if( type == ">" && textAfter.length > 1)n;
121
+ else if( type == "tag" && textAfter !== ">")n;
122
+ else if( type == "tag" && state.stack[state.stack.length-1] == "rule")n--;
123
+ else if( type == "tag")n++;
124
+ else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule" && type === ">")n--;
125
+ else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule")n;
126
+ else if( textAfter.substr(0,1) !== "<" && textAfter.substr(0,1) === ">" )n=n-1;
127
+ else if( textAfter === ">")n;
128
+ else n=n-1;
129
+ //over rule them all
130
+ if(type == null || type == "]")n--;
131
+ }
132
+
133
+ return state.baseIndent + n * indentUnit;
134
+ },
135
+
136
+ electricChars: "]>"
137
+ };
138
+ });
139
+
140
+ CodeMirror.defineMIME("application/xml-dtd", "dtd");
141
+
142
+ });
@@ -0,0 +1,299 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"));
7
+ else if (typeof define == "function" && define.amd) // AMD
8
+ define(["../../lib/codemirror"], mod);
9
+ else // Plain browser env
10
+ mod(CodeMirror);
11
+ })(function(CodeMirror) {
12
+ "use strict";
13
+
14
+ CodeMirror.defineMode("dylan", function(_config) {
15
+ // Words
16
+ var words = {
17
+ // Words that introduce unnamed definitions like "define interface"
18
+ unnamedDefinition: ["interface"],
19
+
20
+ // Words that introduce simple named definitions like "define library"
21
+ namedDefinition: ["module", "library", "macro",
22
+ "C-struct", "C-union",
23
+ "C-function", "C-callable-wrapper"
24
+ ],
25
+
26
+ // Words that introduce type definitions like "define class".
27
+ // These are also parameterized like "define method" and are
28
+ // appended to otherParameterizedDefinitionWords
29
+ typeParameterizedDefinition: ["class", "C-subtype", "C-mapped-subtype"],
30
+
31
+ // Words that introduce trickier definitions like "define method".
32
+ // These require special definitions to be added to startExpressions
33
+ otherParameterizedDefinition: ["method", "function",
34
+ "C-variable", "C-address"
35
+ ],
36
+
37
+ // Words that introduce module constant definitions.
38
+ // These must also be simple definitions and are
39
+ // appended to otherSimpleDefinitionWords
40
+ constantSimpleDefinition: ["constant"],
41
+
42
+ // Words that introduce module variable definitions.
43
+ // These must also be simple definitions and are
44
+ // appended to otherSimpleDefinitionWords
45
+ variableSimpleDefinition: ["variable"],
46
+
47
+ // Other words that introduce simple definitions
48
+ // (without implicit bodies).
49
+ otherSimpleDefinition: ["generic", "domain",
50
+ "C-pointer-type",
51
+ "table"
52
+ ],
53
+
54
+ // Words that begin statements with implicit bodies.
55
+ statement: ["if", "block", "begin", "method", "case",
56
+ "for", "select", "when", "unless", "until",
57
+ "while", "iterate", "profiling", "dynamic-bind"
58
+ ],
59
+
60
+ // Patterns that act as separators in compound statements.
61
+ // This may include any general pattern that must be indented
62
+ // specially.
63
+ separator: ["finally", "exception", "cleanup", "else",
64
+ "elseif", "afterwards"
65
+ ],
66
+
67
+ // Keywords that do not require special indentation handling,
68
+ // but which should be highlighted
69
+ other: ["above", "below", "by", "from", "handler", "in",
70
+ "instance", "let", "local", "otherwise", "slot",
71
+ "subclass", "then", "to", "keyed-by", "virtual"
72
+ ],
73
+
74
+ // Condition signaling function calls
75
+ signalingCalls: ["signal", "error", "cerror",
76
+ "break", "check-type", "abort"
77
+ ]
78
+ };
79
+
80
+ words["otherDefinition"] =
81
+ words["unnamedDefinition"]
82
+ .concat(words["namedDefinition"])
83
+ .concat(words["otherParameterizedDefinition"]);
84
+
85
+ words["definition"] =
86
+ words["typeParameterizedDefinition"]
87
+ .concat(words["otherDefinition"]);
88
+
89
+ words["parameterizedDefinition"] =
90
+ words["typeParameterizedDefinition"]
91
+ .concat(words["otherParameterizedDefinition"]);
92
+
93
+ words["simpleDefinition"] =
94
+ words["constantSimpleDefinition"]
95
+ .concat(words["variableSimpleDefinition"])
96
+ .concat(words["otherSimpleDefinition"]);
97
+
98
+ words["keyword"] =
99
+ words["statement"]
100
+ .concat(words["separator"])
101
+ .concat(words["other"]);
102
+
103
+ // Patterns
104
+ var symbolPattern = "[-_a-zA-Z?!*@<>$%]+";
105
+ var symbol = new RegExp("^" + symbolPattern);
106
+ var patterns = {
107
+ // Symbols with special syntax
108
+ symbolKeyword: symbolPattern + ":",
109
+ symbolClass: "<" + symbolPattern + ">",
110
+ symbolGlobal: "\\*" + symbolPattern + "\\*",
111
+ symbolConstant: "\\$" + symbolPattern
112
+ };
113
+ var patternStyles = {
114
+ symbolKeyword: "atom",
115
+ symbolClass: "tag",
116
+ symbolGlobal: "variable-2",
117
+ symbolConstant: "variable-3"
118
+ };
119
+
120
+ // Compile all patterns to regular expressions
121
+ for (var patternName in patterns)
122
+ if (patterns.hasOwnProperty(patternName))
123
+ patterns[patternName] = new RegExp("^" + patterns[patternName]);
124
+
125
+ // Names beginning "with-" and "without-" are commonly
126
+ // used as statement macro
127
+ patterns["keyword"] = [/^with(?:out)?-[-_a-zA-Z?!*@<>$%]+/];
128
+
129
+ var styles = {};
130
+ styles["keyword"] = "keyword";
131
+ styles["definition"] = "def";
132
+ styles["simpleDefinition"] = "def";
133
+ styles["signalingCalls"] = "builtin";
134
+
135
+ // protected words lookup table
136
+ var wordLookup = {};
137
+ var styleLookup = {};
138
+
139
+ [
140
+ "keyword",
141
+ "definition",
142
+ "simpleDefinition",
143
+ "signalingCalls"
144
+ ].forEach(function(type) {
145
+ words[type].forEach(function(word) {
146
+ wordLookup[word] = type;
147
+ styleLookup[word] = styles[type];
148
+ });
149
+ });
150
+
151
+
152
+ function chain(stream, state, f) {
153
+ state.tokenize = f;
154
+ return f(stream, state);
155
+ }
156
+
157
+ var type, content;
158
+
159
+ function ret(_type, style, _content) {
160
+ type = _type;
161
+ content = _content;
162
+ return style;
163
+ }
164
+
165
+ function tokenBase(stream, state) {
166
+ // String
167
+ var ch = stream.peek();
168
+ if (ch == "'" || ch == '"') {
169
+ stream.next();
170
+ return chain(stream, state, tokenString(ch, "string", "string"));
171
+ }
172
+ // Comment
173
+ else if (ch == "/") {
174
+ stream.next();
175
+ if (stream.eat("*")) {
176
+ return chain(stream, state, tokenComment);
177
+ } else if (stream.eat("/")) {
178
+ stream.skipToEnd();
179
+ return ret("comment", "comment");
180
+ } else {
181
+ stream.skipTo(" ");
182
+ return ret("operator", "operator");
183
+ }
184
+ }
185
+ // Decimal
186
+ else if (/\d/.test(ch)) {
187
+ stream.match(/^\d*(?:\.\d*)?(?:e[+\-]?\d+)?/);
188
+ return ret("number", "number");
189
+ }
190
+ // Hash
191
+ else if (ch == "#") {
192
+ stream.next();
193
+ // Symbol with string syntax
194
+ ch = stream.peek();
195
+ if (ch == '"') {
196
+ stream.next();
197
+ return chain(stream, state, tokenString('"', "symbol", "string-2"));
198
+ }
199
+ // Binary number
200
+ else if (ch == "b") {
201
+ stream.next();
202
+ stream.eatWhile(/[01]/);
203
+ return ret("number", "number");
204
+ }
205
+ // Hex number
206
+ else if (ch == "x") {
207
+ stream.next();
208
+ stream.eatWhile(/[\da-f]/i);
209
+ return ret("number", "number");
210
+ }
211
+ // Octal number
212
+ else if (ch == "o") {
213
+ stream.next();
214
+ stream.eatWhile(/[0-7]/);
215
+ return ret("number", "number");
216
+ }
217
+ // Hash symbol
218
+ else {
219
+ stream.eatWhile(/[-a-zA-Z]/);
220
+ return ret("hash", "keyword");
221
+ }
222
+ } else if (stream.match("end")) {
223
+ return ret("end", "keyword");
224
+ }
225
+ for (var name in patterns) {
226
+ if (patterns.hasOwnProperty(name)) {
227
+ var pattern = patterns[name];
228
+ if ((pattern instanceof Array && pattern.some(function(p) {
229
+ return stream.match(p);
230
+ })) || stream.match(pattern))
231
+ return ret(name, patternStyles[name], stream.current());
232
+ }
233
+ }
234
+ if (stream.match("define")) {
235
+ return ret("definition", "def");
236
+ } else {
237
+ stream.eatWhile(/[\w\-]/);
238
+ // Keyword
239
+ if (wordLookup[stream.current()]) {
240
+ return ret(wordLookup[stream.current()], styleLookup[stream.current()], stream.current());
241
+ } else if (stream.current().match(symbol)) {
242
+ return ret("variable", "variable");
243
+ } else {
244
+ stream.next();
245
+ return ret("other", "variable-2");
246
+ }
247
+ }
248
+ }
249
+
250
+ function tokenComment(stream, state) {
251
+ var maybeEnd = false,
252
+ ch;
253
+ while ((ch = stream.next())) {
254
+ if (ch == "/" && maybeEnd) {
255
+ state.tokenize = tokenBase;
256
+ break;
257
+ }
258
+ maybeEnd = (ch == "*");
259
+ }
260
+ return ret("comment", "comment");
261
+ }
262
+
263
+ function tokenString(quote, type, style) {
264
+ return function(stream, state) {
265
+ var next, end = false;
266
+ while ((next = stream.next()) != null) {
267
+ if (next == quote) {
268
+ end = true;
269
+ break;
270
+ }
271
+ }
272
+ if (end)
273
+ state.tokenize = tokenBase;
274
+ return ret(type, style);
275
+ };
276
+ }
277
+
278
+ // Interface
279
+ return {
280
+ startState: function() {
281
+ return {
282
+ tokenize: tokenBase,
283
+ currentIndent: 0
284
+ };
285
+ },
286
+ token: function(stream, state) {
287
+ if (stream.eatSpace())
288
+ return null;
289
+ var style = state.tokenize(stream, state);
290
+ return style;
291
+ },
292
+ blockCommentStart: "/*",
293
+ blockCommentEnd: "*/"
294
+ };
295
+ });
296
+
297
+ CodeMirror.defineMIME("text/x-dylan", "dylan");
298
+
299
+ });