marty 2.4.7 → 2.4.8
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.
- checksums.yaml +4 -4
- data/Dockerfile.dummy +8 -5
- data/Gemfile.lock +1 -1
- data/README.md +8 -0
- data/app/assets/javascripts/marty/application.js +1 -0
- data/app/assets/javascripts/marty/codemirror/codemirror.js +9730 -0
- data/app/{components/marty/script_form/client → assets/javascripts/marty/codemirror}/mode/delorean/delorean.js +0 -0
- data/app/assets/javascripts/marty/codemirror/mode/javascript/javascript.js +900 -0
- data/app/assets/javascripts/marty/codemirror/mode/python/python.js +399 -0
- data/app/{components/marty/script_form/client → assets/javascripts/marty/codemirror}/mode/ruby/ruby.js +135 -34
- data/app/{components/marty/script_form/client/Ext.ux.form.field.CodeMirror.js → assets/javascripts/marty/extjs/extensions/marty.js} +87 -6
- data/app/assets/stylesheets/marty/application.css +1 -13
- data/app/assets/stylesheets/marty/codemirror/codemirror.css +346 -0
- data/app/{components/marty/script_form/client → assets/stylesheets/marty/codemirror}/delorean.css +0 -0
- data/app/components/marty/auth_app/client/auth_app.js +82 -80
- data/app/components/marty/data_grid_view.rb +1 -54
- data/app/components/marty/data_grid_view/client/data_grid_view.js +49 -0
- data/app/components/marty/form.rb +1 -5
- data/app/components/marty/form/client/form.js +5 -0
- data/app/components/marty/grid.rb +1 -146
- data/app/components/marty/grid/client/grid.js +146 -0
- data/app/components/marty/import_view.rb +1 -32
- data/app/components/marty/import_view/client/import_view.js +32 -0
- data/app/components/marty/live_search_grid_panel.rb +1 -21
- data/app/components/marty/live_search_grid_panel/client/live_search_grid_panel.js +27 -0
- data/app/components/marty/main_auth_app.rb +4 -145
- data/app/components/marty/main_auth_app/client/main_auth_app.js +124 -0
- data/app/components/marty/mcfly_grid_panel.rb +1 -17
- data/app/components/marty/mcfly_grid_panel/client/mcfly_grid_panel.js +37 -0
- data/app/components/marty/new_posting_form.rb +1 -6
- data/app/components/marty/new_posting_form/client/new_posting_form.js +6 -0
- data/app/components/marty/panel.rb +1 -5
- data/app/components/marty/panel/client/panel.js +5 -0
- data/app/components/marty/posting_grid.rb +4 -55
- data/app/components/marty/posting_grid/client/posting_grid.js +50 -0
- data/app/components/marty/promise_view.rb +2 -75
- data/app/components/marty/promise_view/client/promise_view.css +12 -9
- data/app/components/marty/promise_view/client/promise_view.js +57 -0
- data/app/components/marty/report_form.rb +3 -69
- data/app/components/marty/report_form/client/report_form.js +78 -0
- data/app/components/marty/report_select.rb +1 -45
- data/app/components/marty/report_select/client/report_select.js +50 -0
- data/app/components/marty/reporting.rb +1 -8
- data/app/components/marty/reporting/client/reporting.js +8 -0
- data/app/components/marty/script_form.rb +2 -63
- data/app/components/marty/script_form/client/script_form.js +44 -0
- data/app/components/marty/script_tester.rb +1 -7
- data/app/components/marty/script_tester/client/script_tester.js +7 -0
- data/app/components/marty/scripting.rb +1 -55
- data/app/components/marty/scripting/client/scripting.js +62 -0
- data/app/components/marty/simple_app/client/simple_app.js +21 -13
- data/app/models/marty/promise.rb +22 -1
- data/app/views/layouts/marty/application.html.erb +8 -6
- data/docker-compose.dummy.yml +2 -0
- data/lib/marty/monkey.rb +0 -16
- data/lib/marty/version.rb +1 -1
- data/spec/dummy/config/initializers/assets.rb +1 -0
- data/spec/features/reporting_spec.rb +1 -0
- data/spec/features/scripting_spec.rb +4 -4
- data/spec/spec_helper.rb +1 -0
- data/spec/support/chromedriver.rb +5 -1
- data/spec/support/shared_connection_db_helpers.rb +42 -2
- metadata +29 -168
- data/app/assets/images/marty/.gitkeep +0 -0
- data/app/components/marty/mcfly_grid_panel/client/dup_in_form.js +0 -20
- data/app/components/marty/script_form/client/codemirror.css +0 -172
- data/app/components/marty/script_form/client/codemirror.js +0 -3130
- data/app/components/marty/script_form/client/mode/clike/clike.js +0 -284
- data/app/components/marty/script_form/client/mode/clike/index.html +0 -102
- data/app/components/marty/script_form/client/mode/clike/scala.html +0 -766
- data/app/components/marty/script_form/client/mode/clojure/clojure.js +0 -206
- data/app/components/marty/script_form/client/mode/clojure/index.html +0 -67
- data/app/components/marty/script_form/client/mode/coffeescript/LICENSE +0 -22
- data/app/components/marty/script_form/client/mode/coffeescript/coffeescript.js +0 -346
- data/app/components/marty/script_form/client/mode/coffeescript/index.html +0 -728
- data/app/components/marty/script_form/client/mode/commonlisp/commonlisp.js +0 -101
- data/app/components/marty/script_form/client/mode/commonlisp/index.html +0 -165
- data/app/components/marty/script_form/client/mode/css/css.js +0 -448
- data/app/components/marty/script_form/client/mode/css/index.html +0 -58
- data/app/components/marty/script_form/client/mode/css/test.js +0 -501
- data/app/components/marty/script_form/client/mode/diff/diff.js +0 -32
- data/app/components/marty/script_form/client/mode/diff/index.html +0 -105
- data/app/components/marty/script_form/client/mode/ecl/ecl.js +0 -203
- data/app/components/marty/script_form/client/mode/ecl/index.html +0 -42
- data/app/components/marty/script_form/client/mode/erlang/erlang.js +0 -463
- data/app/components/marty/script_form/client/mode/erlang/index.html +0 -63
- data/app/components/marty/script_form/client/mode/gfm/gfm.js +0 -150
- data/app/components/marty/script_form/client/mode/gfm/index.html +0 -48
- data/app/components/marty/script_form/client/mode/go/go.js +0 -170
- data/app/components/marty/script_form/client/mode/go/index.html +0 -73
- data/app/components/marty/script_form/client/mode/groovy/groovy.js +0 -210
- data/app/components/marty/script_form/client/mode/groovy/index.html +0 -72
- data/app/components/marty/script_form/client/mode/haskell/haskell.js +0 -242
- data/app/components/marty/script_form/client/mode/haskell/index.html +0 -61
- data/app/components/marty/script_form/client/mode/haxe/haxe.js +0 -429
- data/app/components/marty/script_form/client/mode/haxe/index.html +0 -91
- data/app/components/marty/script_form/client/mode/htmlembedded/htmlembedded.js +0 -72
- data/app/components/marty/script_form/client/mode/htmlembedded/index.html +0 -50
- data/app/components/marty/script_form/client/mode/htmlmixed/htmlmixed.js +0 -84
- data/app/components/marty/script_form/client/mode/htmlmixed/index.html +0 -52
- data/app/components/marty/script_form/client/mode/javascript/index.html +0 -78
- data/app/components/marty/script_form/client/mode/javascript/javascript.js +0 -361
- data/app/components/marty/script_form/client/mode/jinja2/index.html +0 -38
- data/app/components/marty/script_form/client/mode/jinja2/jinja2.js +0 -42
- data/app/components/marty/script_form/client/mode/less/index.html +0 -740
- data/app/components/marty/script_form/client/mode/less/less.js +0 -266
- data/app/components/marty/script_form/client/mode/lua/index.html +0 -73
- data/app/components/marty/script_form/client/mode/lua/lua.js +0 -140
- data/app/components/marty/script_form/client/mode/markdown/index.html +0 -343
- data/app/components/marty/script_form/client/mode/markdown/markdown.js +0 -382
- data/app/components/marty/script_form/client/mode/markdown/test.js +0 -1084
- data/app/components/marty/script_form/client/mode/mysql/index.html +0 -42
- data/app/components/marty/script_form/client/mode/mysql/mysql.js +0 -186
- data/app/components/marty/script_form/client/mode/ntriples/index.html +0 -33
- data/app/components/marty/script_form/client/mode/ntriples/ntriples.js +0 -172
- data/app/components/marty/script_form/client/mode/ocaml/index.html +0 -130
- data/app/components/marty/script_form/client/mode/ocaml/ocaml.js +0 -114
- data/app/components/marty/script_form/client/mode/pascal/LICENSE +0 -7
- data/app/components/marty/script_form/client/mode/pascal/index.html +0 -49
- data/app/components/marty/script_form/client/mode/pascal/pascal.js +0 -94
- data/app/components/marty/script_form/client/mode/perl/LICENSE +0 -19
- data/app/components/marty/script_form/client/mode/perl/index.html +0 -63
- data/app/components/marty/script_form/client/mode/perl/perl.js +0 -816
- data/app/components/marty/script_form/client/mode/php/index.html +0 -49
- data/app/components/marty/script_form/client/mode/php/php.js +0 -148
- data/app/components/marty/script_form/client/mode/pig/index.html +0 -43
- data/app/components/marty/script_form/client/mode/pig/pig.js +0 -172
- data/app/components/marty/script_form/client/mode/plsql/index.html +0 -63
- data/app/components/marty/script_form/client/mode/plsql/plsql.js +0 -217
- data/app/components/marty/script_form/client/mode/properties/index.html +0 -41
- data/app/components/marty/script_form/client/mode/properties/properties.js +0 -63
- data/app/components/marty/script_form/client/mode/python/LICENSE.txt +0 -21
- data/app/components/marty/script_form/client/mode/python/index.html +0 -123
- data/app/components/marty/script_form/client/mode/python/python.js +0 -338
- data/app/components/marty/script_form/client/mode/r/LICENSE +0 -24
- data/app/components/marty/script_form/client/mode/r/index.html +0 -74
- data/app/components/marty/script_form/client/mode/r/r.js +0 -141
- data/app/components/marty/script_form/client/mode/rpm/changes/changes.js +0 -19
- data/app/components/marty/script_form/client/mode/rpm/changes/index.html +0 -54
- data/app/components/marty/script_form/client/mode/rpm/spec/index.html +0 -100
- data/app/components/marty/script_form/client/mode/rpm/spec/spec.css +0 -5
- data/app/components/marty/script_form/client/mode/rpm/spec/spec.js +0 -66
- data/app/components/marty/script_form/client/mode/rst/index.html +0 -526
- data/app/components/marty/script_form/client/mode/rst/rst.js +0 -326
- data/app/components/marty/script_form/client/mode/ruby/LICENSE +0 -24
- data/app/components/marty/script_form/client/mode/ruby/index.html +0 -172
- data/app/components/marty/script_form/client/mode/rust/index.html +0 -49
- data/app/components/marty/script_form/client/mode/rust/rust.js +0 -432
- data/app/components/marty/script_form/client/mode/scheme/index.html +0 -65
- data/app/components/marty/script_form/client/mode/scheme/scheme.js +0 -230
- data/app/components/marty/script_form/client/mode/shell/index.html +0 -50
- data/app/components/marty/script_form/client/mode/shell/shell.js +0 -118
- data/app/components/marty/script_form/client/mode/sieve/LICENSE +0 -23
- data/app/components/marty/script_form/client/mode/sieve/index.html +0 -81
- data/app/components/marty/script_form/client/mode/sieve/sieve.js +0 -156
- data/app/components/marty/script_form/client/mode/smalltalk/index.html +0 -56
- data/app/components/marty/script_form/client/mode/smalltalk/smalltalk.js +0 -139
- data/app/components/marty/script_form/client/mode/smarty/index.html +0 -83
- data/app/components/marty/script_form/client/mode/smarty/smarty.js +0 -148
- data/app/components/marty/script_form/client/mode/sparql/index.html +0 -41
- data/app/components/marty/script_form/client/mode/sparql/sparql.js +0 -143
- data/app/components/marty/script_form/client/mode/stex/index.html +0 -98
- data/app/components/marty/script_form/client/mode/stex/stex.js +0 -182
- data/app/components/marty/script_form/client/mode/stex/test.js +0 -343
- data/app/components/marty/script_form/client/mode/tiddlywiki/index.html +0 -141
- data/app/components/marty/script_form/client/mode/tiddlywiki/tiddlywiki.css +0 -14
- data/app/components/marty/script_form/client/mode/tiddlywiki/tiddlywiki.js +0 -384
- data/app/components/marty/script_form/client/mode/tiki/index.html +0 -83
- data/app/components/marty/script_form/client/mode/tiki/tiki.css +0 -26
- data/app/components/marty/script_form/client/mode/tiki/tiki.js +0 -309
- data/app/components/marty/script_form/client/mode/vb/LICENSE.txt +0 -21
- data/app/components/marty/script_form/client/mode/vb/index.html +0 -89
- data/app/components/marty/script_form/client/mode/vb/vb.js +0 -260
- data/app/components/marty/script_form/client/mode/vbscript/index.html +0 -43
- data/app/components/marty/script_form/client/mode/vbscript/vbscript.js +0 -26
- data/app/components/marty/script_form/client/mode/velocity/index.html +0 -104
- data/app/components/marty/script_form/client/mode/velocity/velocity.js +0 -146
- data/app/components/marty/script_form/client/mode/verilog/index.html +0 -211
- data/app/components/marty/script_form/client/mode/verilog/verilog.js +0 -194
- data/app/components/marty/script_form/client/mode/xml/index.html +0 -45
- data/app/components/marty/script_form/client/mode/xml/xml.js +0 -318
- data/app/components/marty/script_form/client/mode/xquery/LICENSE +0 -20
- data/app/components/marty/script_form/client/mode/xquery/index.html +0 -223
- data/app/components/marty/script_form/client/mode/xquery/test/index.html +0 -27
- data/app/components/marty/script_form/client/mode/xquery/test/testBase.js +0 -42
- data/app/components/marty/script_form/client/mode/xquery/test/testEmptySequenceKeyword.js +0 -16
- data/app/components/marty/script_form/client/mode/xquery/test/testMultiAttr.js +0 -16
- data/app/components/marty/script_form/client/mode/xquery/test/testNamespaces.js +0 -91
- data/app/components/marty/script_form/client/mode/xquery/test/testProcessingInstructions.js +0 -16
- data/app/components/marty/script_form/client/mode/xquery/test/testQuotes.js +0 -19
- data/app/components/marty/script_form/client/mode/xquery/xquery.js +0 -451
- data/app/components/marty/script_form/client/mode/yaml/index.html +0 -68
- data/app/components/marty/script_form/client/mode/yaml/yaml.js +0 -95
- data/app/components/marty/script_form/client/theme/ambiance.css +0 -81
- data/app/components/marty/script_form/client/theme/blackboard.css +0 -25
- data/app/components/marty/script_form/client/theme/cobalt.css +0 -18
- data/app/components/marty/script_form/client/theme/eclipse.css +0 -25
- data/app/components/marty/script_form/client/theme/elegant.css +0 -10
- data/app/components/marty/script_form/client/theme/erlang-dark.css +0 -21
- data/app/components/marty/script_form/client/theme/lesser-dark.css +0 -44
- data/app/components/marty/script_form/client/theme/monokai.css +0 -28
- data/app/components/marty/script_form/client/theme/neat.css +0 -9
- data/app/components/marty/script_form/client/theme/night.css +0 -21
- data/app/components/marty/script_form/client/theme/rubyblue.css +0 -21
- data/app/components/marty/script_form/client/theme/vibrant-ink.css +0 -27
- data/app/components/marty/script_form/client/theme/xq-dark.css +0 -46
- data/app/components/marty/script_form/client/util/closetag.js +0 -164
- data/app/components/marty/script_form/client/util/dialog.css +0 -27
- data/app/components/marty/script_form/client/util/dialog.js +0 -70
- data/app/components/marty/script_form/client/util/foldcode.js +0 -196
- data/app/components/marty/script_form/client/util/formatting.js +0 -193
- data/app/components/marty/script_form/client/util/javascript-hint.js +0 -134
- data/app/components/marty/script_form/client/util/loadmode.js +0 -51
- data/app/components/marty/script_form/client/util/match-highlighter.js +0 -44
- data/app/components/marty/script_form/client/util/multiplex.js +0 -77
- data/app/components/marty/script_form/client/util/overlay.js +0 -54
- data/app/components/marty/script_form/client/util/pig-hint.js +0 -123
- data/app/components/marty/script_form/client/util/runmode-standalone.js +0 -90
- data/app/components/marty/script_form/client/util/runmode.js +0 -53
- data/app/components/marty/script_form/client/util/search.js +0 -118
- data/app/components/marty/script_form/client/util/searchcursor.js +0 -119
- data/app/components/marty/script_form/client/util/simple-hint.css +0 -16
- data/app/components/marty/script_form/client/util/simple-hint.js +0 -97
- data/app/components/marty/script_form/client/util/xml-hint.js +0 -137
- data/lib/marty/javascript/grid_view_in_form.js +0 -81
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<title>CodeMirror: CSS mode</title>
|
|
6
|
-
<link rel="stylesheet" href="../../lib/codemirror.css">
|
|
7
|
-
<script src="../../lib/codemirror.js"></script>
|
|
8
|
-
<script src="css.js"></script>
|
|
9
|
-
<style>.CodeMirror {background: #f8f8f8;}</style>
|
|
10
|
-
<link rel="stylesheet" href="../../doc/docs.css">
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<h1>CodeMirror: CSS mode</h1>
|
|
14
|
-
<form><textarea id="code" name="code">
|
|
15
|
-
/* Some example CSS */
|
|
16
|
-
|
|
17
|
-
@import url("something.css");
|
|
18
|
-
|
|
19
|
-
body {
|
|
20
|
-
margin: 0;
|
|
21
|
-
padding: 3em 6em;
|
|
22
|
-
font-family: tahoma, arial, sans-serif;
|
|
23
|
-
color: #000;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
#navigation a {
|
|
27
|
-
font-weight: bold;
|
|
28
|
-
text-decoration: none !important;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
h1 {
|
|
32
|
-
font-size: 2.5em;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
h2 {
|
|
36
|
-
font-size: 1.7em;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
h1:before, h2:before {
|
|
40
|
-
content: "::";
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
code {
|
|
44
|
-
font-family: courier, monospace;
|
|
45
|
-
font-size: 80%;
|
|
46
|
-
color: #418A8A;
|
|
47
|
-
}
|
|
48
|
-
</textarea></form>
|
|
49
|
-
<script>
|
|
50
|
-
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {});
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<p><strong>MIME types defined:</strong> <code>text/css</code>.</p>
|
|
54
|
-
|
|
55
|
-
<p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#css_*">normal</a>, <a href="../../test/index.html#verbose,css_*">verbose</a>.</p>
|
|
56
|
-
|
|
57
|
-
</body>
|
|
58
|
-
</html>
|
|
@@ -1,501 +0,0 @@
|
|
|
1
|
-
// Initiate ModeTest and set defaults
|
|
2
|
-
var MT = ModeTest;
|
|
3
|
-
MT.modeName = 'css';
|
|
4
|
-
MT.modeOptions = {};
|
|
5
|
-
|
|
6
|
-
// Requires at least one media query
|
|
7
|
-
MT.testMode(
|
|
8
|
-
'atMediaEmpty',
|
|
9
|
-
'@media { }',
|
|
10
|
-
[
|
|
11
|
-
'def', '@media',
|
|
12
|
-
null, ' ',
|
|
13
|
-
'error', '{',
|
|
14
|
-
null, ' }'
|
|
15
|
-
]
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
MT.testMode(
|
|
19
|
-
'atMediaMultiple',
|
|
20
|
-
'@media not screen and (color), not print and (color) { }',
|
|
21
|
-
[
|
|
22
|
-
'def', '@media',
|
|
23
|
-
null, ' ',
|
|
24
|
-
'keyword', 'not',
|
|
25
|
-
null, ' ',
|
|
26
|
-
'attribute', 'screen',
|
|
27
|
-
null, ' ',
|
|
28
|
-
'operator', 'and',
|
|
29
|
-
null, ' (',
|
|
30
|
-
'property', 'color',
|
|
31
|
-
null, '), ',
|
|
32
|
-
'keyword', 'not',
|
|
33
|
-
null, ' ',
|
|
34
|
-
'attribute', 'print',
|
|
35
|
-
null, ' ',
|
|
36
|
-
'operator', 'and',
|
|
37
|
-
null, ' (',
|
|
38
|
-
'property', 'color',
|
|
39
|
-
null, ') { }'
|
|
40
|
-
]
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
MT.testMode(
|
|
44
|
-
'atMediaCheckStack',
|
|
45
|
-
'@media screen { } foo { }',
|
|
46
|
-
[
|
|
47
|
-
'def', '@media',
|
|
48
|
-
null, ' ',
|
|
49
|
-
'attribute', 'screen',
|
|
50
|
-
null, ' { } ',
|
|
51
|
-
'tag', 'foo',
|
|
52
|
-
null, ' { }'
|
|
53
|
-
]
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
MT.testMode(
|
|
57
|
-
'atMediaCheckStack',
|
|
58
|
-
'@media screen (color) { } foo { }',
|
|
59
|
-
[
|
|
60
|
-
'def', '@media',
|
|
61
|
-
null, ' ',
|
|
62
|
-
'attribute', 'screen',
|
|
63
|
-
null, ' (',
|
|
64
|
-
'property', 'color',
|
|
65
|
-
null, ') { } ',
|
|
66
|
-
'tag', 'foo',
|
|
67
|
-
null, ' { }'
|
|
68
|
-
]
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
MT.testMode(
|
|
72
|
-
'atMediaCheckStackInvalidAttribute',
|
|
73
|
-
'@media foobarhello { } foo { }',
|
|
74
|
-
[
|
|
75
|
-
'def', '@media',
|
|
76
|
-
null, ' ',
|
|
77
|
-
'attribute error', 'foobarhello',
|
|
78
|
-
null, ' { } ',
|
|
79
|
-
'tag', 'foo',
|
|
80
|
-
null, ' { }'
|
|
81
|
-
]
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
// Error, because "and" is only allowed immediately preceding a media expression
|
|
85
|
-
MT.testMode(
|
|
86
|
-
'atMediaInvalidAttribute',
|
|
87
|
-
'@media foobarhello { }',
|
|
88
|
-
[
|
|
89
|
-
'def', '@media',
|
|
90
|
-
null, ' ',
|
|
91
|
-
'attribute error', 'foobarhello',
|
|
92
|
-
null, ' { }'
|
|
93
|
-
]
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
// Error, because "and" is only allowed immediately preceding a media expression
|
|
97
|
-
MT.testMode(
|
|
98
|
-
'atMediaInvalidAnd',
|
|
99
|
-
'@media and screen { }',
|
|
100
|
-
[
|
|
101
|
-
'def', '@media',
|
|
102
|
-
null, ' ',
|
|
103
|
-
'error', 'and',
|
|
104
|
-
null, ' ',
|
|
105
|
-
'attribute', 'screen',
|
|
106
|
-
null, ' { }'
|
|
107
|
-
]
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
// Error, because "not" is only allowed as the first item in each media query
|
|
111
|
-
MT.testMode(
|
|
112
|
-
'atMediaInvalidNot',
|
|
113
|
-
'@media screen not (not) { }',
|
|
114
|
-
[
|
|
115
|
-
'def', '@media',
|
|
116
|
-
null, ' ',
|
|
117
|
-
'attribute', 'screen',
|
|
118
|
-
null, ' ',
|
|
119
|
-
'error', 'not',
|
|
120
|
-
null, ' (',
|
|
121
|
-
'error', 'not',
|
|
122
|
-
null, ') { }'
|
|
123
|
-
]
|
|
124
|
-
);
|
|
125
|
-
|
|
126
|
-
// Error, because "only" is only allowed as the first item in each media query
|
|
127
|
-
MT.testMode(
|
|
128
|
-
'atMediaInvalidOnly',
|
|
129
|
-
'@media screen only (only) { }',
|
|
130
|
-
[
|
|
131
|
-
'def', '@media',
|
|
132
|
-
null, ' ',
|
|
133
|
-
'attribute', 'screen',
|
|
134
|
-
null, ' ',
|
|
135
|
-
'error', 'only',
|
|
136
|
-
null, ' (',
|
|
137
|
-
'error', 'only',
|
|
138
|
-
null, ') { }'
|
|
139
|
-
]
|
|
140
|
-
);
|
|
141
|
-
|
|
142
|
-
// Error, because "foobarhello" is neither a known type or property, but
|
|
143
|
-
// property was expected (after "and"), and it should be in parenthese.
|
|
144
|
-
MT.testMode(
|
|
145
|
-
'atMediaUnknownType',
|
|
146
|
-
'@media screen and foobarhello { }',
|
|
147
|
-
[
|
|
148
|
-
'def', '@media',
|
|
149
|
-
null, ' ',
|
|
150
|
-
'attribute', 'screen',
|
|
151
|
-
null, ' ',
|
|
152
|
-
'operator', 'and',
|
|
153
|
-
null, ' ',
|
|
154
|
-
'error', 'foobarhello',
|
|
155
|
-
null, ' { }'
|
|
156
|
-
]
|
|
157
|
-
);
|
|
158
|
-
|
|
159
|
-
// Error, because "color" is not a known type, but is a known property, and
|
|
160
|
-
// should be in parentheses.
|
|
161
|
-
MT.testMode(
|
|
162
|
-
'atMediaInvalidType',
|
|
163
|
-
'@media screen and color { }',
|
|
164
|
-
[
|
|
165
|
-
'def', '@media',
|
|
166
|
-
null, ' ',
|
|
167
|
-
'attribute', 'screen',
|
|
168
|
-
null, ' ',
|
|
169
|
-
'operator', 'and',
|
|
170
|
-
null, ' ',
|
|
171
|
-
'error', 'color',
|
|
172
|
-
null, ' { }'
|
|
173
|
-
]
|
|
174
|
-
);
|
|
175
|
-
|
|
176
|
-
// Error, because "print" is not a known property, but is a known type,
|
|
177
|
-
// and should not be in parenthese.
|
|
178
|
-
MT.testMode(
|
|
179
|
-
'atMediaInvalidProperty',
|
|
180
|
-
'@media screen and (print) { }',
|
|
181
|
-
[
|
|
182
|
-
'def', '@media',
|
|
183
|
-
null, ' ',
|
|
184
|
-
'attribute', 'screen',
|
|
185
|
-
null, ' ',
|
|
186
|
-
'operator', 'and',
|
|
187
|
-
null, ' (',
|
|
188
|
-
'error', 'print',
|
|
189
|
-
null, ') { }'
|
|
190
|
-
]
|
|
191
|
-
);
|
|
192
|
-
|
|
193
|
-
// Soft error, because "foobarhello" is not a known property or type.
|
|
194
|
-
MT.testMode(
|
|
195
|
-
'atMediaUnknownProperty',
|
|
196
|
-
'@media screen and (foobarhello) { }',
|
|
197
|
-
[
|
|
198
|
-
'def', '@media',
|
|
199
|
-
null, ' ',
|
|
200
|
-
'attribute', 'screen',
|
|
201
|
-
null, ' ',
|
|
202
|
-
'operator', 'and',
|
|
203
|
-
null, ' (',
|
|
204
|
-
'property error', 'foobarhello',
|
|
205
|
-
null, ') { }'
|
|
206
|
-
]
|
|
207
|
-
);
|
|
208
|
-
|
|
209
|
-
MT.testMode(
|
|
210
|
-
'tagSelector',
|
|
211
|
-
'foo { }',
|
|
212
|
-
[
|
|
213
|
-
'tag', 'foo',
|
|
214
|
-
null, ' { }'
|
|
215
|
-
]
|
|
216
|
-
);
|
|
217
|
-
|
|
218
|
-
MT.testMode(
|
|
219
|
-
'classSelector',
|
|
220
|
-
'.foo { }',
|
|
221
|
-
[
|
|
222
|
-
'qualifier', '.foo',
|
|
223
|
-
null, ' { }'
|
|
224
|
-
]
|
|
225
|
-
);
|
|
226
|
-
|
|
227
|
-
MT.testMode(
|
|
228
|
-
'idSelector',
|
|
229
|
-
'#foo { #foo }',
|
|
230
|
-
[
|
|
231
|
-
'builtin', '#foo',
|
|
232
|
-
null, ' { ',
|
|
233
|
-
'error', '#foo',
|
|
234
|
-
null, ' }'
|
|
235
|
-
]
|
|
236
|
-
);
|
|
237
|
-
|
|
238
|
-
MT.testMode(
|
|
239
|
-
'tagSelectorUnclosed',
|
|
240
|
-
'foo { margin: 0 } bar { }',
|
|
241
|
-
[
|
|
242
|
-
'tag', 'foo',
|
|
243
|
-
null, ' { ',
|
|
244
|
-
'property', 'margin',
|
|
245
|
-
'operator', ':',
|
|
246
|
-
null, ' ',
|
|
247
|
-
'number', '0',
|
|
248
|
-
null, ' } ',
|
|
249
|
-
'tag', 'bar',
|
|
250
|
-
null, ' { }'
|
|
251
|
-
]
|
|
252
|
-
);
|
|
253
|
-
|
|
254
|
-
MT.testMode(
|
|
255
|
-
'tagStringNoQuotes',
|
|
256
|
-
'foo { font-family: hello world; }',
|
|
257
|
-
[
|
|
258
|
-
'tag', 'foo',
|
|
259
|
-
null, ' { ',
|
|
260
|
-
'property', 'font-family',
|
|
261
|
-
'operator', ':',
|
|
262
|
-
null, ' ',
|
|
263
|
-
'variable-2', 'hello',
|
|
264
|
-
null, ' ',
|
|
265
|
-
'variable-2', 'world',
|
|
266
|
-
null, '; }'
|
|
267
|
-
]
|
|
268
|
-
);
|
|
269
|
-
|
|
270
|
-
MT.testMode(
|
|
271
|
-
'tagStringDouble',
|
|
272
|
-
'foo { font-family: "hello world"; }',
|
|
273
|
-
[
|
|
274
|
-
'tag', 'foo',
|
|
275
|
-
null, ' { ',
|
|
276
|
-
'property', 'font-family',
|
|
277
|
-
'operator', ':',
|
|
278
|
-
null, ' ',
|
|
279
|
-
'string', '"hello world"',
|
|
280
|
-
null, '; }'
|
|
281
|
-
]
|
|
282
|
-
);
|
|
283
|
-
|
|
284
|
-
MT.testMode(
|
|
285
|
-
'tagStringSingle',
|
|
286
|
-
'foo { font-family: \'hello world\'; }',
|
|
287
|
-
[
|
|
288
|
-
'tag', 'foo',
|
|
289
|
-
null, ' { ',
|
|
290
|
-
'property', 'font-family',
|
|
291
|
-
'operator', ':',
|
|
292
|
-
null, ' ',
|
|
293
|
-
'string', '\'hello world\'',
|
|
294
|
-
null, '; }'
|
|
295
|
-
]
|
|
296
|
-
);
|
|
297
|
-
|
|
298
|
-
MT.testMode(
|
|
299
|
-
'tagColorKeyword',
|
|
300
|
-
'foo { color: black; }',
|
|
301
|
-
[
|
|
302
|
-
'tag', 'foo',
|
|
303
|
-
null, ' { ',
|
|
304
|
-
'property', 'color',
|
|
305
|
-
'operator', ':',
|
|
306
|
-
null, ' ',
|
|
307
|
-
'keyword', 'black',
|
|
308
|
-
null, '; }'
|
|
309
|
-
]
|
|
310
|
-
);
|
|
311
|
-
|
|
312
|
-
MT.testMode(
|
|
313
|
-
'tagColorHex3',
|
|
314
|
-
'foo { background: #fff; }',
|
|
315
|
-
[
|
|
316
|
-
'tag', 'foo',
|
|
317
|
-
null, ' { ',
|
|
318
|
-
'property', 'background',
|
|
319
|
-
'operator', ':',
|
|
320
|
-
null, ' ',
|
|
321
|
-
'atom', '#fff',
|
|
322
|
-
null, '; }'
|
|
323
|
-
]
|
|
324
|
-
);
|
|
325
|
-
|
|
326
|
-
MT.testMode(
|
|
327
|
-
'tagColorHex6',
|
|
328
|
-
'foo { background: #ffffff; }',
|
|
329
|
-
[
|
|
330
|
-
'tag', 'foo',
|
|
331
|
-
null, ' { ',
|
|
332
|
-
'property', 'background',
|
|
333
|
-
'operator', ':',
|
|
334
|
-
null, ' ',
|
|
335
|
-
'atom', '#ffffff',
|
|
336
|
-
null, '; }'
|
|
337
|
-
]
|
|
338
|
-
);
|
|
339
|
-
|
|
340
|
-
MT.testMode(
|
|
341
|
-
'tagColorHex4',
|
|
342
|
-
'foo { background: #ffff; }',
|
|
343
|
-
[
|
|
344
|
-
'tag', 'foo',
|
|
345
|
-
null, ' { ',
|
|
346
|
-
'property', 'background',
|
|
347
|
-
'operator', ':',
|
|
348
|
-
null, ' ',
|
|
349
|
-
'atom error', '#ffff',
|
|
350
|
-
null, '; }'
|
|
351
|
-
]
|
|
352
|
-
);
|
|
353
|
-
|
|
354
|
-
MT.testMode(
|
|
355
|
-
'tagColorHexInvalid',
|
|
356
|
-
'foo { background: #ffg; }',
|
|
357
|
-
[
|
|
358
|
-
'tag', 'foo',
|
|
359
|
-
null, ' { ',
|
|
360
|
-
'property', 'background',
|
|
361
|
-
'operator', ':',
|
|
362
|
-
null, ' ',
|
|
363
|
-
'atom error', '#ffg',
|
|
364
|
-
null, '; }'
|
|
365
|
-
]
|
|
366
|
-
);
|
|
367
|
-
|
|
368
|
-
MT.testMode(
|
|
369
|
-
'tagNegativeNumber',
|
|
370
|
-
'foo { margin: -5px; }',
|
|
371
|
-
[
|
|
372
|
-
'tag', 'foo',
|
|
373
|
-
null, ' { ',
|
|
374
|
-
'property', 'margin',
|
|
375
|
-
'operator', ':',
|
|
376
|
-
null, ' ',
|
|
377
|
-
'number', '-5px',
|
|
378
|
-
null, '; }'
|
|
379
|
-
]
|
|
380
|
-
);
|
|
381
|
-
|
|
382
|
-
MT.testMode(
|
|
383
|
-
'tagPositiveNumber',
|
|
384
|
-
'foo { padding: 5px; }',
|
|
385
|
-
[
|
|
386
|
-
'tag', 'foo',
|
|
387
|
-
null, ' { ',
|
|
388
|
-
'property', 'padding',
|
|
389
|
-
'operator', ':',
|
|
390
|
-
null, ' ',
|
|
391
|
-
'number', '5px',
|
|
392
|
-
null, '; }'
|
|
393
|
-
]
|
|
394
|
-
);
|
|
395
|
-
|
|
396
|
-
MT.testMode(
|
|
397
|
-
'tagVendor',
|
|
398
|
-
'foo { -foo-box-sizing: -foo-border-box; }',
|
|
399
|
-
[
|
|
400
|
-
'tag', 'foo',
|
|
401
|
-
null, ' { ',
|
|
402
|
-
'meta', '-foo-',
|
|
403
|
-
'property', 'box-sizing',
|
|
404
|
-
'operator', ':',
|
|
405
|
-
null, ' ',
|
|
406
|
-
'meta', '-foo-',
|
|
407
|
-
'string-2', 'border-box',
|
|
408
|
-
null, '; }'
|
|
409
|
-
]
|
|
410
|
-
);
|
|
411
|
-
|
|
412
|
-
MT.testMode(
|
|
413
|
-
'tagBogusProperty',
|
|
414
|
-
'foo { barhelloworld: 0; }',
|
|
415
|
-
[
|
|
416
|
-
'tag', 'foo',
|
|
417
|
-
null, ' { ',
|
|
418
|
-
'property error', 'barhelloworld',
|
|
419
|
-
'operator', ':',
|
|
420
|
-
null, ' ',
|
|
421
|
-
'number', '0',
|
|
422
|
-
null, '; }'
|
|
423
|
-
]
|
|
424
|
-
);
|
|
425
|
-
|
|
426
|
-
MT.testMode(
|
|
427
|
-
'tagTwoProperties',
|
|
428
|
-
'foo { margin: 0; padding: 0; }',
|
|
429
|
-
[
|
|
430
|
-
'tag', 'foo',
|
|
431
|
-
null, ' { ',
|
|
432
|
-
'property', 'margin',
|
|
433
|
-
'operator', ':',
|
|
434
|
-
null, ' ',
|
|
435
|
-
'number', '0',
|
|
436
|
-
null, '; ',
|
|
437
|
-
'property', 'padding',
|
|
438
|
-
'operator', ':',
|
|
439
|
-
null, ' ',
|
|
440
|
-
'number', '0',
|
|
441
|
-
null, '; }'
|
|
442
|
-
]
|
|
443
|
-
);
|
|
444
|
-
//
|
|
445
|
-
//MT.testMode(
|
|
446
|
-
// 'tagClass',
|
|
447
|
-
// '@media only screen and (min-width: 500px), print {foo.bar#hello { color: black !important; background: #f00; margin: -5px; padding: 5px; -foo-box-sizing: border-box; } /* world */}',
|
|
448
|
-
// [
|
|
449
|
-
// 'def', '@media',
|
|
450
|
-
// null, ' ',
|
|
451
|
-
// 'keyword', 'only',
|
|
452
|
-
// null, ' ',
|
|
453
|
-
// 'attribute', 'screen',
|
|
454
|
-
// null, ' ',
|
|
455
|
-
// 'operator', 'and',
|
|
456
|
-
// null, ' ',
|
|
457
|
-
// 'bracket', '(',
|
|
458
|
-
// 'property', 'min-width',
|
|
459
|
-
// 'operator', ':',
|
|
460
|
-
// null, ' ',
|
|
461
|
-
// 'number', '500px',
|
|
462
|
-
// 'bracket', ')',
|
|
463
|
-
// null, ', ',
|
|
464
|
-
// 'attribute', 'print',
|
|
465
|
-
// null, ' {',
|
|
466
|
-
// 'tag', 'foo',
|
|
467
|
-
// 'qualifier', '.bar',
|
|
468
|
-
// 'header', '#hello',
|
|
469
|
-
// null, ' { ',
|
|
470
|
-
// 'property', 'color',
|
|
471
|
-
// 'operator', ':',
|
|
472
|
-
// null, ' ',
|
|
473
|
-
// 'keyword', 'black',
|
|
474
|
-
// null, ' ',
|
|
475
|
-
// 'keyword', '!important',
|
|
476
|
-
// null, '; ',
|
|
477
|
-
// 'property', 'background',
|
|
478
|
-
// 'operator', ':',
|
|
479
|
-
// null, ' ',
|
|
480
|
-
// 'atom', '#f00',
|
|
481
|
-
// null, '; ',
|
|
482
|
-
// 'property', 'padding',
|
|
483
|
-
// 'operator', ':',
|
|
484
|
-
// null, ' ',
|
|
485
|
-
// 'number', '5px',
|
|
486
|
-
// null, '; ',
|
|
487
|
-
// 'property', 'margin',
|
|
488
|
-
// 'operator', ':',
|
|
489
|
-
// null, ' ',
|
|
490
|
-
// 'number', '-5px',
|
|
491
|
-
// null, '; ',
|
|
492
|
-
// 'meta', '-foo-',
|
|
493
|
-
// 'property', 'box-sizing',
|
|
494
|
-
// 'operator', ':',
|
|
495
|
-
// null, ' ',
|
|
496
|
-
// 'string-2', 'border-box',
|
|
497
|
-
// null, '; } ',
|
|
498
|
-
// 'comment', '/* world */',
|
|
499
|
-
// null, '}'
|
|
500
|
-
// ]
|
|
501
|
-
//);
|