haml 1.5.2 → 1.7.0
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.
Potentially problematic release.
This version of haml might be problematic. Click here for more details.
- data/MIT-LICENSE +1 -1
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/bin/css2sass +7 -0
- data/bin/html2haml +0 -82
- data/lib/haml.rb +43 -6
- data/lib/haml/buffer.rb +81 -72
- data/lib/haml/engine.rb +240 -110
- data/lib/haml/exec.rb +120 -5
- data/lib/haml/helpers.rb +88 -3
- data/lib/haml/helpers/action_view_extensions.rb +45 -0
- data/lib/haml/helpers/action_view_mods.rb +30 -17
- data/lib/haml/html.rb +173 -0
- data/lib/haml/template.rb +1 -26
- data/lib/haml/util.rb +18 -0
- data/lib/sass.rb +181 -3
- data/lib/sass/constant.rb +38 -9
- data/lib/sass/constant/color.rb +25 -1
- data/lib/sass/constant/literal.rb +10 -8
- data/lib/sass/css.rb +197 -0
- data/lib/sass/engine.rb +239 -68
- data/lib/sass/error.rb +2 -2
- data/lib/sass/plugin.rb +11 -3
- data/lib/sass/tree/attr_node.rb +25 -17
- data/lib/sass/tree/comment_node.rb +14 -0
- data/lib/sass/tree/node.rb +18 -1
- data/lib/sass/tree/rule_node.rb +17 -5
- data/lib/sass/tree/value_node.rb +4 -0
- data/test/haml/engine_test.rb +42 -25
- data/test/haml/helper_test.rb +28 -3
- data/test/haml/results/eval_suppressed.xhtml +6 -0
- data/test/haml/results/helpers.xhtml +26 -2
- data/test/haml/results/helpful.xhtml +2 -0
- data/test/haml/results/just_stuff.xhtml +17 -2
- data/test/haml/results/standard.xhtml +1 -1
- data/test/haml/results/whitespace_handling.xhtml +1 -11
- data/test/haml/rhtml/standard.rhtml +1 -1
- data/test/haml/template_test.rb +7 -2
- data/test/haml/templates/eval_suppressed.haml +7 -2
- data/test/haml/templates/helpers.haml +16 -1
- data/test/haml/templates/helpful.haml +2 -0
- data/test/haml/templates/just_stuff.haml +23 -4
- data/test/haml/templates/standard.haml +3 -3
- data/test/haml/templates/whitespace_handling.haml +0 -50
- data/test/sass/engine_test.rb +35 -10
- data/test/sass/plugin_test.rb +10 -6
- data/test/sass/results/alt.css +4 -0
- data/test/sass/results/complex.css +4 -3
- data/test/sass/results/constants.css +3 -3
- data/test/sass/results/import.css +27 -0
- data/test/sass/results/nested.css +7 -0
- data/test/sass/results/parent_ref.css +13 -0
- data/test/sass/results/subdir/nested_subdir/nested_subdir.css +1 -0
- data/test/sass/results/subdir/subdir.css +1 -0
- data/test/sass/templates/alt.sass +16 -0
- data/test/sass/templates/bork2.sass +2 -0
- data/test/sass/templates/complex.sass +19 -1
- data/test/sass/templates/constants.sass +8 -0
- data/test/sass/templates/import.sass +8 -0
- data/test/sass/templates/importee.sass +10 -0
- data/test/sass/templates/nested.sass +8 -0
- data/test/sass/templates/parent_ref.sass +25 -0
- data/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +3 -0
- data/test/sass/templates/subdir/subdir.sass +6 -0
- metadata +95 -75
- data/test/haml/results/semantic.cache +0 -15
@@ -0,0 +1,13 @@
|
|
1
|
+
a { color: #000; }
|
2
|
+
a:hover { color: #f00; }
|
3
|
+
|
4
|
+
p, div { width: 100em; }
|
5
|
+
p foo, div foo { width: 10em; }
|
6
|
+
p:hover, p bar, div:hover, div bar { height: 20em; }
|
7
|
+
|
8
|
+
#cool { border-style: solid; border-width: 2em; }
|
9
|
+
.ie7 #cool, .ie6 #cool { content: string(Totally not cool.); }
|
10
|
+
.firefox #cool { content: string(Quite cool.); }
|
11
|
+
|
12
|
+
.wow, .snazzy { font-family: fantasy; }
|
13
|
+
.wow:hover, .wow:visited, .snazzy:hover, .snazzy:visited { font-weight: bold; }
|
@@ -0,0 +1 @@
|
|
1
|
+
#pi { width: 314px; }
|
@@ -0,0 +1 @@
|
|
1
|
+
#subdir { font-size: 20px; font-weight: bold; }
|
@@ -78,9 +78,13 @@ body
|
|
78
78
|
:margin 0 5px
|
79
79
|
:padding 5px 5px 0 5px
|
80
80
|
:display inline
|
81
|
+
// This comment is in the middle of this rule
|
81
82
|
:font-size 1.1em
|
83
|
+
// This comment is properly indented
|
82
84
|
:color #fff
|
83
85
|
:background #00a4e4
|
86
|
+
/ This rule isn't a comment!
|
87
|
+
:red green
|
84
88
|
a:link, a:visited
|
85
89
|
:color #fff
|
86
90
|
:text-decoration none
|
@@ -105,6 +109,9 @@ body
|
|
105
109
|
a:hover
|
106
110
|
:text-decoration underline
|
107
111
|
|
112
|
+
// A hard tab:
|
113
|
+
|
114
|
+
|
108
115
|
#content
|
109
116
|
p, div
|
110
117
|
:width 40em
|
@@ -123,11 +130,20 @@ body
|
|
123
130
|
:float left
|
124
131
|
:margin 0 1em auto 1em
|
125
132
|
:border 1px solid #6e000d
|
133
|
+
:style solid
|
126
134
|
h2
|
127
135
|
:margin 0 0 10px 0
|
128
136
|
:padding 0.5em
|
137
|
+
/* The background image is a gif!
|
129
138
|
:background #6e000d url(/images/hdr_participant.gif) 2px 2px no-repeat
|
139
|
+
/* Okay check this out
|
140
|
+
Multiline comments
|
141
|
+
Wow dude
|
142
|
+
I mean seriously, WOW
|
130
143
|
:text-indent -9999px
|
144
|
+
// And also...
|
145
|
+
Multiline comments that don't output!
|
146
|
+
Snazzy, no?
|
131
147
|
:border
|
132
148
|
:top
|
133
149
|
:width 5px
|
@@ -231,7 +247,9 @@ body
|
|
231
247
|
ul
|
232
248
|
:text-align right
|
233
249
|
li
|
234
|
-
:display inline
|
250
|
+
:display inline
|
251
|
+
:border none
|
252
|
+
:padding 0
|
235
253
|
.column.right
|
236
254
|
:width 290px
|
237
255
|
:padding-left 10px
|
@@ -10,6 +10,7 @@
|
|
10
10
|
!qstr= "Quo\"ted\"!"
|
11
11
|
!hstr= "Hyph-en!"
|
12
12
|
!concat = (5 + 4) hi there
|
13
|
+
!percent= 11%
|
13
14
|
|
14
15
|
#main
|
15
16
|
:content = !str
|
@@ -18,6 +19,8 @@
|
|
18
19
|
:width = !width
|
19
20
|
:background-color #000
|
20
21
|
:color= !main_text
|
22
|
+
:short-color= #123
|
23
|
+
:named-color= olive
|
21
24
|
:con= foo bar (!concat boom)
|
22
25
|
:con2= noquo "quo"
|
23
26
|
#sidebar
|
@@ -40,6 +43,7 @@
|
|
40
43
|
:num-neg= 10 + -.13
|
41
44
|
:str= 100 + px
|
42
45
|
:col= 13 + #aaa
|
46
|
+
:perc = !percent + 20%
|
43
47
|
:str
|
44
48
|
:str= hi + \ there
|
45
49
|
:str2= hi + " there"
|
@@ -55,6 +59,10 @@
|
|
55
59
|
:col
|
56
60
|
:num= #fffffa - 5.2
|
57
61
|
:col= #abcdef - #fedcba
|
62
|
+
:unary
|
63
|
+
:num= -1
|
64
|
+
:const= -!neg
|
65
|
+
:paren= -(5 + 6)
|
58
66
|
|
59
67
|
#times
|
60
68
|
:num
|
@@ -0,0 +1,25 @@
|
|
1
|
+
a
|
2
|
+
:color #000
|
3
|
+
&:hover
|
4
|
+
:color #f00
|
5
|
+
|
6
|
+
p, div
|
7
|
+
:width 100em
|
8
|
+
& foo
|
9
|
+
:width 10em
|
10
|
+
&:hover, bar
|
11
|
+
:height 20em
|
12
|
+
|
13
|
+
#cool
|
14
|
+
:border
|
15
|
+
:style solid
|
16
|
+
:width 2em
|
17
|
+
.ie7 &, .ie6 &
|
18
|
+
:content string(Totally not cool.)
|
19
|
+
.firefox &
|
20
|
+
:content string(Quite cool.)
|
21
|
+
|
22
|
+
.wow, .snazzy
|
23
|
+
:font-family fantasy
|
24
|
+
&:hover, &:visited
|
25
|
+
:font-weight bold
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.2
|
3
3
|
specification_version: 1
|
4
4
|
name: haml
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.
|
7
|
-
date: 2007-
|
6
|
+
version: 1.7.0
|
7
|
+
date: 2007-07-07 00:00:00 -07: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
|
@@ -29,113 +29,133 @@ post_install_message:
|
|
29
29
|
authors:
|
30
30
|
- Hampton Catlin
|
31
31
|
files:
|
32
|
-
- lib/
|
32
|
+
- lib/sass.rb
|
33
33
|
- lib/sass
|
34
|
+
- lib/haml
|
34
35
|
- lib/haml.rb
|
35
|
-
- lib/sass.rb
|
36
|
-
- lib/haml/helpers
|
37
|
-
- lib/haml/helpers.rb
|
38
|
-
- lib/haml/engine.rb
|
39
|
-
- lib/haml/buffer.rb
|
40
|
-
- lib/haml/template.rb
|
41
|
-
- lib/haml/filters.rb
|
42
|
-
- lib/haml/exec.rb
|
43
|
-
- lib/haml/error.rb
|
44
|
-
- lib/haml/helpers/action_view_mods.rb
|
36
|
+
- lib/sass/error.rb
|
45
37
|
- lib/sass/tree
|
38
|
+
- lib/sass/constant.rb
|
46
39
|
- lib/sass/constant
|
47
40
|
- lib/sass/plugin.rb
|
41
|
+
- lib/sass/css.rb
|
48
42
|
- lib/sass/engine.rb
|
49
|
-
- lib/sass/constant.rb
|
50
|
-
- lib/sass/error.rb
|
51
43
|
- lib/sass/tree/value_node.rb
|
52
44
|
- lib/sass/tree/attr_node.rb
|
53
|
-
- lib/sass/tree/rule_node.rb
|
54
45
|
- lib/sass/tree/node.rb
|
55
|
-
- lib/sass/
|
46
|
+
- lib/sass/tree/comment_node.rb
|
47
|
+
- lib/sass/tree/rule_node.rb
|
56
48
|
- lib/sass/constant/color.rb
|
57
49
|
- lib/sass/constant/string.rb
|
58
50
|
- lib/sass/constant/number.rb
|
51
|
+
- lib/sass/constant/operation.rb
|
59
52
|
- lib/sass/constant/literal.rb
|
60
|
-
-
|
53
|
+
- lib/haml/util.rb
|
54
|
+
- lib/haml/exec.rb
|
55
|
+
- lib/haml/html.rb
|
56
|
+
- lib/haml/error.rb
|
57
|
+
- lib/haml/buffer.rb
|
58
|
+
- lib/haml/template.rb
|
59
|
+
- lib/haml/helpers.rb
|
60
|
+
- lib/haml/filters.rb
|
61
|
+
- lib/haml/engine.rb
|
62
|
+
- lib/haml/helpers
|
63
|
+
- lib/haml/helpers/action_view_extensions.rb
|
64
|
+
- lib/haml/helpers/action_view_mods.rb
|
65
|
+
- bin/css2sass
|
61
66
|
- bin/sass
|
67
|
+
- bin/haml
|
62
68
|
- bin/html2haml
|
63
|
-
- test/haml
|
64
69
|
- test/sass
|
70
|
+
- test/haml
|
65
71
|
- test/profile.rb
|
66
72
|
- test/benchmark.rb
|
67
|
-
- test/
|
68
|
-
- test/
|
73
|
+
- test/sass/templates
|
74
|
+
- test/sass/plugin_test.rb
|
75
|
+
- test/sass/results
|
76
|
+
- test/sass/engine_test.rb
|
77
|
+
- test/sass/templates/bork2.sass
|
78
|
+
- test/sass/templates/expanded.sass
|
79
|
+
- test/sass/templates/import.sass
|
80
|
+
- test/sass/templates/subdir
|
81
|
+
- test/sass/templates/basic.sass
|
82
|
+
- test/sass/templates/nested.sass
|
83
|
+
- test/sass/templates/compact.sass
|
84
|
+
- test/sass/templates/alt.sass
|
85
|
+
- test/sass/templates/constants.sass
|
86
|
+
- test/sass/templates/importee.sass
|
87
|
+
- test/sass/templates/parent_ref.sass
|
88
|
+
- test/sass/templates/bork.sass
|
89
|
+
- test/sass/templates/complex.sass
|
90
|
+
- test/sass/templates/subdir/subdir.sass
|
91
|
+
- test/sass/templates/subdir/nested_subdir
|
92
|
+
- test/sass/templates/subdir/nested_subdir/nested_subdir.sass
|
93
|
+
- test/sass/results/nested.css
|
94
|
+
- test/sass/results/subdir
|
95
|
+
- test/sass/results/import.css
|
96
|
+
- test/sass/results/compact.css
|
97
|
+
- test/sass/results/expanded.css
|
98
|
+
- test/sass/results/alt.css
|
99
|
+
- test/sass/results/complex.css
|
100
|
+
- test/sass/results/constants.css
|
101
|
+
- test/sass/results/parent_ref.css
|
102
|
+
- test/sass/results/basic.css
|
103
|
+
- test/sass/results/subdir/nested_subdir
|
104
|
+
- test/sass/results/subdir/subdir.css
|
105
|
+
- test/sass/results/subdir/nested_subdir/nested_subdir.css
|
69
106
|
- test/haml/mocks
|
70
|
-
- test/haml/
|
107
|
+
- test/haml/template_test.rb
|
108
|
+
- test/haml/rhtml
|
71
109
|
- test/haml/helper_test.rb
|
72
|
-
- test/haml/
|
110
|
+
- test/haml/templates
|
73
111
|
- test/haml/runner.rb
|
74
|
-
- test/haml/
|
75
|
-
- test/haml/
|
76
|
-
- test/haml/results/eval_suppressed.xhtml
|
77
|
-
- test/haml/results/very_basic.xhtml
|
78
|
-
- test/haml/results/original_engine.xhtml
|
79
|
-
- test/haml/results/list.xhtml
|
80
|
-
- test/haml/results/just_stuff.xhtml
|
81
|
-
- test/haml/results/content_for_layout.xhtml
|
82
|
-
- test/haml/results/tag_parsing.xhtml
|
83
|
-
- test/haml/results/helpful.xhtml
|
84
|
-
- test/haml/results/partials.xhtml
|
85
|
-
- test/haml/results/standard.xhtml
|
86
|
-
- test/haml/results/silent_script.xhtml
|
87
|
-
- test/haml/results/helpers.xhtml
|
88
|
-
- test/haml/results/filters.xhtml
|
89
|
-
- test/haml/results/semantic.cache
|
90
|
-
- test/haml/rhtml/standard.rhtml
|
112
|
+
- test/haml/results
|
113
|
+
- test/haml/engine_test.rb
|
91
114
|
- test/haml/mocks/article.rb
|
92
|
-
- test/haml/
|
93
|
-
- test/haml/templates/helpful.haml
|
94
|
-
- test/haml/templates/whitespace_handling.haml
|
95
|
-
- test/haml/templates/helpers.haml
|
96
|
-
- test/haml/templates/partialize.haml
|
97
|
-
- test/haml/templates/eval_suppressed.haml
|
115
|
+
- test/haml/rhtml/standard.rhtml
|
98
116
|
- test/haml/templates/list.haml
|
99
117
|
- test/haml/templates/_text_area.haml
|
100
|
-
- test/haml/templates/content_for_layout.haml
|
101
|
-
- test/haml/templates/partials.haml
|
102
|
-
- test/haml/templates/silent_script.haml
|
103
|
-
- test/haml/templates/very_basic.haml
|
104
|
-
- test/haml/templates/original_engine.haml
|
105
118
|
- test/haml/templates/_partial.haml
|
119
|
+
- test/haml/templates/helpful.haml
|
106
120
|
- test/haml/templates/just_stuff.haml
|
121
|
+
- test/haml/templates/silent_script.haml
|
122
|
+
- test/haml/templates/very_basic.haml
|
123
|
+
- test/haml/templates/eval_suppressed.haml
|
107
124
|
- test/haml/templates/tag_parsing.haml
|
125
|
+
- test/haml/templates/whitespace_handling.haml
|
126
|
+
- test/haml/templates/partials.haml
|
127
|
+
- test/haml/templates/standard.haml
|
128
|
+
- test/haml/templates/partialize.haml
|
108
129
|
- test/haml/templates/filters.haml
|
130
|
+
- test/haml/templates/content_for_layout.haml
|
131
|
+
- test/haml/templates/helpers.haml
|
132
|
+
- test/haml/templates/original_engine.haml
|
109
133
|
- test/haml/templates/breakage.haml
|
110
|
-
- test/
|
111
|
-
- test/
|
112
|
-
- test/
|
113
|
-
- test/
|
114
|
-
- test/
|
115
|
-
- test/
|
116
|
-
- test/
|
117
|
-
- test/
|
118
|
-
- test/
|
119
|
-
- test/
|
120
|
-
- test/
|
121
|
-
- test/
|
122
|
-
- test/
|
123
|
-
- test/
|
124
|
-
- test/sass/templates/bork.sass
|
125
|
-
- test/sass/templates/basic.sass
|
126
|
-
- test/sass/templates/nested.sass
|
127
|
-
- test/sass/templates/compact.sass
|
134
|
+
- test/haml/results/content_for_layout.xhtml
|
135
|
+
- test/haml/results/just_stuff.xhtml
|
136
|
+
- test/haml/results/whitespace_handling.xhtml
|
137
|
+
- test/haml/results/silent_script.xhtml
|
138
|
+
- test/haml/results/filters.xhtml
|
139
|
+
- test/haml/results/standard.xhtml
|
140
|
+
- test/haml/results/helpful.xhtml
|
141
|
+
- test/haml/results/very_basic.xhtml
|
142
|
+
- test/haml/results/eval_suppressed.xhtml
|
143
|
+
- test/haml/results/partials.xhtml
|
144
|
+
- test/haml/results/original_engine.xhtml
|
145
|
+
- test/haml/results/helpers.xhtml
|
146
|
+
- test/haml/results/list.xhtml
|
147
|
+
- test/haml/results/tag_parsing.xhtml
|
128
148
|
- Rakefile
|
129
149
|
- init.rb
|
130
|
-
- MIT-LICENSE
|
131
150
|
- VERSION
|
151
|
+
- MIT-LICENSE
|
132
152
|
- README
|
133
153
|
test_files:
|
134
|
-
- test/haml/helper_test.rb
|
135
|
-
- test/haml/engine_test.rb
|
136
|
-
- test/haml/template_test.rb
|
137
154
|
- test/sass/plugin_test.rb
|
138
155
|
- test/sass/engine_test.rb
|
156
|
+
- test/haml/template_test.rb
|
157
|
+
- test/haml/helper_test.rb
|
158
|
+
- test/haml/engine_test.rb
|
139
159
|
rdoc_options:
|
140
160
|
- --title
|
141
161
|
- Haml
|
@@ -146,8 +166,8 @@ rdoc_options:
|
|
146
166
|
- --line-numbers
|
147
167
|
- --inline-source
|
148
168
|
extra_rdoc_files:
|
149
|
-
- MIT-LICENSE
|
150
169
|
- VERSION
|
170
|
+
- MIT-LICENSE
|
151
171
|
- README
|
152
172
|
executables:
|
153
173
|
- haml
|
@@ -1,15 +0,0 @@
|
|
1
|
-
;; Object results/
|
2
|
-
;; SEMANTICDB Tags save file
|
3
|
-
(semanticdb-project-database-file "results/"
|
4
|
-
:tables (list
|
5
|
-
(semanticdb-table "helpers.xhtml"
|
6
|
-
:major-mode 'html-mode
|
7
|
-
:tags '(("Big!" section nil nil [566 682]) ("bar" section (:members (("here" section nil nil [801 1277]) ("google" section nil nil [1277 1280]))) nil [682 685]))
|
8
|
-
:file "helpers.xhtml"
|
9
|
-
:pointmax 1325
|
10
|
-
)
|
11
|
-
)
|
12
|
-
:file "semantic.cache"
|
13
|
-
:semantic-tag-version "2.0pre3"
|
14
|
-
:semanticdb-version "2.0pre3"
|
15
|
-
)
|