haml 1.7.2 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of haml might be problematic. Click here for more details.
- data/README +17 -9
- data/Rakefile +12 -4
- data/VERSION +1 -1
- data/init.rb +1 -6
- data/lib/haml.rb +65 -7
- data/lib/haml/buffer.rb +49 -84
- data/lib/haml/engine.rb +155 -797
- data/lib/haml/error.rb +3 -33
- data/lib/haml/exec.rb +86 -65
- data/lib/haml/filters.rb +57 -27
- data/lib/haml/helpers.rb +52 -9
- data/lib/haml/helpers/action_view_mods.rb +1 -1
- data/lib/haml/html.rb +20 -5
- data/lib/haml/precompiler.rb +671 -0
- data/lib/haml/template.rb +20 -73
- data/lib/haml/template/patch.rb +51 -0
- data/lib/haml/template/plugin.rb +21 -0
- data/lib/sass.rb +78 -3
- data/lib/sass/constant.rb +45 -19
- data/lib/sass/constant.rb.rej +42 -0
- data/lib/sass/constant/string.rb +4 -0
- data/lib/sass/css.rb +162 -39
- data/lib/sass/engine.rb +38 -14
- data/lib/sass/plugin.rb +79 -44
- data/lib/sass/tree/attr_node.rb +12 -11
- data/lib/sass/tree/comment_node.rb +9 -3
- data/lib/sass/tree/directive_node.rb +51 -0
- data/lib/sass/tree/node.rb +13 -6
- data/lib/sass/tree/rule_node.rb +34 -12
- data/test/benchmark.rb +85 -52
- data/test/haml/engine_test.rb +172 -84
- data/test/haml/helper_test.rb +31 -3
- data/test/haml/html2haml_test.rb +60 -0
- data/test/haml/markaby/standard.mab +52 -0
- data/test/haml/results/eval_suppressed.xhtml +4 -1
- data/test/haml/results/helpers.xhtml +15 -4
- data/test/haml/results/just_stuff.xhtml +9 -1
- data/test/haml/results/standard.xhtml +0 -1
- data/test/haml/rhtml/_av_partial_1.rhtml +12 -0
- data/test/haml/rhtml/_av_partial_2.rhtml +8 -0
- data/test/haml/rhtml/action_view.rhtml +62 -0
- data/test/haml/rhtml/standard.rhtml +0 -1
- data/test/haml/template_test.rb +41 -21
- data/test/haml/templates/_av_partial_1.haml +9 -0
- data/test/haml/templates/_av_partial_2.haml +5 -0
- data/test/haml/templates/action_view.haml +47 -0
- data/test/haml/templates/eval_suppressed.haml +1 -0
- data/test/haml/templates/helpers.haml +9 -3
- data/test/haml/templates/just_stuff.haml +10 -1
- data/test/haml/templates/partials.haml +1 -1
- data/test/haml/templates/standard.haml +0 -1
- data/test/profile.rb +2 -2
- data/test/sass/engine_test.rb +113 -3
- data/test/sass/engine_test.rb.rej +18 -0
- data/test/sass/plugin_test.rb +34 -11
- data/test/sass/results/compact.css +1 -1
- data/test/sass/results/complex.css +1 -1
- data/test/sass/results/compressed.css +1 -0
- data/test/sass/results/constants.css +3 -1
- data/test/sass/results/expanded.css +2 -1
- data/test/sass/results/import.css +2 -0
- data/test/sass/results/nested.css +2 -1
- data/test/sass/templates/_partial.sass +2 -0
- data/test/sass/templates/compact.sass +2 -0
- data/test/sass/templates/complex.sass +1 -0
- data/test/sass/templates/compressed.sass +15 -0
- data/test/sass/templates/constants.sass +9 -0
- data/test/sass/templates/expanded.sass +2 -0
- data/test/sass/templates/import.sass +1 -1
- data/test/sass/templates/nested.sass +2 -0
- metadata +22 -2
@@ -0,0 +1 @@
|
|
1
|
+
#main{width:15em;color:#0000ff}#main p{border-style:dotted;border-width:2px}#main .cool{width:100px}#left{font-size:2em;font-weight:bold;float:left}
|
@@ -3,10 +3,12 @@
|
|
3
3
|
|
4
4
|
#plus { num-num: 7; num-num-un: 25em; num-num-un2: 23em; num-num-neg: 9.87; num-str: 100px; num-col: #b7b7b7; num-perc: 31%; str-str: hi there; str-str2: hi there; str-col: 14em solid #112233; str-num: times: 13; col-num: #ff7b9d; col-col: #5173ff; }
|
5
5
|
|
6
|
-
#minus { num-num: 900; col-num: #f9f9f4; col-col: #000035; unary-num: -1; unary-const: 10; unary-paren: -11; }
|
6
|
+
#minus { num-num: 900; col-num: #f9f9f4; col-col: #000035; unary-num: -1; unary-const: 10; unary-paren: -11; unary-two: 12; unary-many: 12; unary-crazy: -15; }
|
7
7
|
|
8
8
|
#times { num-num: 7; num-col: #7496b8; col-num: #092345; col-col: #243648; }
|
9
9
|
|
10
10
|
#div { num-num: 3.33333333333333; num-num2: 3; col-num: #092345; col-col: #0b0d0f; }
|
11
11
|
|
12
12
|
#mod { num-num: 2; col-col: #0f0e05; col-num: #020001; }
|
13
|
+
|
14
|
+
#const { escaped-quote: !foo; escaped-slash: !foo; default: Hello! !important; }
|
@@ -3,6 +3,8 @@
|
|
3
3
|
color: #0000ff; }
|
4
4
|
#main p {
|
5
5
|
border-style: dotted;
|
6
|
+
/* Nested comment
|
7
|
+
* More nested stuff */
|
6
8
|
border-width: 2px; }
|
7
9
|
#main .cool {
|
8
10
|
width: 100px; }
|
@@ -10,7 +12,6 @@
|
|
10
12
|
#left {
|
11
13
|
font-size: 2em;
|
12
14
|
font-weight: bold;
|
13
|
-
|
14
15
|
float: left; }
|
15
16
|
|
16
17
|
#right .header {
|
@@ -63,6 +63,9 @@
|
|
63
63
|
:num= -1
|
64
64
|
:const= -!neg
|
65
65
|
:paren= -(5 + 6)
|
66
|
+
:two= --12
|
67
|
+
:many= --------12
|
68
|
+
:crazy= -----(5 + ---!neg)
|
66
69
|
|
67
70
|
#times
|
68
71
|
:num
|
@@ -86,3 +89,9 @@
|
|
86
89
|
:col
|
87
90
|
:col= #5f6e7d % #10200a
|
88
91
|
:num= #aaabac % 3
|
92
|
+
|
93
|
+
#const
|
94
|
+
:escaped
|
95
|
+
:quote = "!foo"
|
96
|
+
:slash = \!foo
|
97
|
+
:default = !str !important
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: haml
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.
|
7
|
-
date:
|
6
|
+
version: 1.8.0
|
7
|
+
date: 2008-01-06 00:00:00 -08:00
|
8
8
|
summary: An elegant, structured XHTML/XML templating engine. Comes with Sass, a similar CSS templating engine.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -36,10 +36,12 @@ files:
|
|
36
36
|
- lib/sass/plugin
|
37
37
|
- lib/sass/plugin/rails.rb
|
38
38
|
- lib/sass/plugin/merb.rb
|
39
|
+
- lib/sass/constant.rb.rej
|
39
40
|
- lib/sass/error.rb
|
40
41
|
- lib/sass/tree
|
41
42
|
- lib/sass/tree/value_node.rb
|
42
43
|
- lib/sass/tree/attr_node.rb
|
44
|
+
- lib/sass/tree/directive_node.rb
|
43
45
|
- lib/sass/tree/node.rb
|
44
46
|
- lib/sass/tree/comment_node.rb
|
45
47
|
- lib/sass/tree/rule_node.rb
|
@@ -60,9 +62,13 @@ files:
|
|
60
62
|
- lib/haml/error.rb
|
61
63
|
- lib/haml/buffer.rb
|
62
64
|
- lib/haml/template.rb
|
65
|
+
- lib/haml/template
|
66
|
+
- lib/haml/template/plugin.rb
|
67
|
+
- lib/haml/template/patch.rb
|
63
68
|
- lib/haml/helpers.rb
|
64
69
|
- lib/haml/filters.rb
|
65
70
|
- lib/haml/engine.rb
|
71
|
+
- lib/haml/precompiler.rb
|
66
72
|
- lib/haml/helpers
|
67
73
|
- lib/haml/helpers/action_view_extensions.rb
|
68
74
|
- lib/haml/helpers/action_view_mods.rb.rej
|
@@ -75,6 +81,7 @@ files:
|
|
75
81
|
- test/sass
|
76
82
|
- test/sass/templates
|
77
83
|
- test/sass/templates/bork2.sass
|
84
|
+
- test/sass/templates/compressed.sass
|
78
85
|
- test/sass/templates/expanded.sass
|
79
86
|
- test/sass/templates/import.sass
|
80
87
|
- test/sass/templates/subdir
|
@@ -82,6 +89,7 @@ files:
|
|
82
89
|
- test/sass/templates/subdir/nested_subdir
|
83
90
|
- test/sass/templates/subdir/nested_subdir/nested_subdir.sass
|
84
91
|
- test/sass/templates/basic.sass
|
92
|
+
- test/sass/templates/_partial.sass
|
85
93
|
- test/sass/templates/nested.sass
|
86
94
|
- test/sass/templates/compact.sass
|
87
95
|
- test/sass/templates/alt.sass
|
@@ -103,20 +111,27 @@ files:
|
|
103
111
|
- test/sass/results/alt.css
|
104
112
|
- test/sass/results/complex.css
|
105
113
|
- test/sass/results/constants.css
|
114
|
+
- test/sass/results/compressed.css
|
106
115
|
- test/sass/results/parent_ref.css
|
107
116
|
- test/sass/results/basic.css
|
117
|
+
- test/sass/engine_test.rb.rej
|
108
118
|
- test/sass/engine_test.rb
|
109
119
|
- test/haml
|
110
120
|
- test/haml/mocks
|
111
121
|
- test/haml/mocks/article.rb
|
112
122
|
- test/haml/template_test.rb
|
123
|
+
- test/haml/html2haml_test.rb
|
113
124
|
- test/haml/rhtml
|
125
|
+
- test/haml/rhtml/_av_partial_1.rhtml
|
114
126
|
- test/haml/rhtml/standard.rhtml
|
127
|
+
- test/haml/rhtml/action_view.rhtml
|
128
|
+
- test/haml/rhtml/_av_partial_2.rhtml
|
115
129
|
- test/haml/helper_test.rb
|
116
130
|
- test/haml/templates
|
117
131
|
- test/haml/templates/list.haml
|
118
132
|
- test/haml/templates/_text_area.haml
|
119
133
|
- test/haml/templates/_partial.haml
|
134
|
+
- test/haml/templates/_av_partial_2.haml
|
120
135
|
- test/haml/templates/helpful.haml
|
121
136
|
- test/haml/templates/just_stuff.haml
|
122
137
|
- test/haml/templates/silent_script.haml
|
@@ -127,11 +142,13 @@ files:
|
|
127
142
|
- test/haml/templates/partials.haml
|
128
143
|
- test/haml/templates/standard.haml
|
129
144
|
- test/haml/templates/partialize.haml
|
145
|
+
- test/haml/templates/_av_partial_1.haml
|
130
146
|
- test/haml/templates/filters.haml
|
131
147
|
- test/haml/templates/content_for_layout.haml
|
132
148
|
- test/haml/templates/helpers.haml
|
133
149
|
- test/haml/templates/original_engine.haml
|
134
150
|
- test/haml/templates/breakage.haml
|
151
|
+
- test/haml/templates/action_view.haml
|
135
152
|
- test/haml/runner.rb
|
136
153
|
- test/haml/results
|
137
154
|
- test/haml/results/content_for_layout.xhtml
|
@@ -148,6 +165,8 @@ files:
|
|
148
165
|
- test/haml/results/helpers.xhtml
|
149
166
|
- test/haml/results/list.xhtml
|
150
167
|
- test/haml/results/tag_parsing.xhtml
|
168
|
+
- test/haml/markaby
|
169
|
+
- test/haml/markaby/standard.mab
|
151
170
|
- test/haml/engine_test.rb
|
152
171
|
- test/profile.rb
|
153
172
|
- test/benchmark.rb
|
@@ -160,6 +179,7 @@ test_files:
|
|
160
179
|
- test/sass/plugin_test.rb
|
161
180
|
- test/sass/engine_test.rb
|
162
181
|
- test/haml/template_test.rb
|
182
|
+
- test/haml/html2haml_test.rb
|
163
183
|
- test/haml/helper_test.rb
|
164
184
|
- test/haml/engine_test.rb
|
165
185
|
rdoc_options:
|