haml 5.0.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +18 -0
- data/.gitmodules +3 -0
- data/.travis.yml +38 -0
- data/CHANGELOG.md +43 -19
- data/Gemfile +18 -0
- data/README.md +1 -0
- data/Rakefile +6 -12
- data/TODO +24 -0
- data/benchmark.rb +66 -0
- data/haml.gemspec +39 -0
- data/lib/haml/.gitattributes +1 -0
- data/lib/haml/attribute_parser.rb +4 -0
- data/lib/haml/compiler.rb +2 -1
- data/lib/haml/helpers/safe_erubi_template.rb +0 -8
- data/lib/haml/options.rb +3 -0
- data/lib/haml/railtie.rb +11 -2
- data/lib/haml/temple_engine.rb +1 -0
- data/lib/haml/version.rb +1 -1
- data/test/attribute_parser_test.rb +4 -0
- data/test/engine_test.rb +7 -0
- data/test/filters_test.rb +2 -7
- data/test/template_test.rb +10 -0
- data/yard/default/.gitignore +1 -0
- data/yard/default/fulldoc/html/css/common.sass +15 -0
- data/yard/default/layout/html/footer.erb +12 -0
- metadata +13 -65
- data/test/erb/_av_partial_1.erb +0 -12
- data/test/erb/_av_partial_2.erb +0 -8
- data/test/erb/action_view.erb +0 -62
- data/test/erb/standard.erb +0 -55
- data/test/gemfiles/Gemfile.rails-4.0.x +0 -11
- data/test/gemfiles/Gemfile.rails-4.0.x.lock +0 -87
- data/test/gemfiles/Gemfile.rails-4.1.x +0 -5
- data/test/gemfiles/Gemfile.rails-4.2.x +0 -5
- data/test/gemfiles/Gemfile.rails-5.0.x +0 -4
- data/test/markaby/standard.mab +0 -52
- data/test/mocks/article.rb +0 -6
- data/test/results/bemit.xhtml +0 -4
- data/test/results/content_for_layout.xhtml +0 -12
- data/test/results/eval_suppressed.xhtml +0 -9
- data/test/results/helpers.xhtml +0 -72
- data/test/results/helpful.xhtml +0 -13
- data/test/results/just_stuff.xhtml +0 -71
- data/test/results/list.xhtml +0 -12
- data/test/results/nuke_inner_whitespace.xhtml +0 -40
- data/test/results/nuke_outer_whitespace.xhtml +0 -140
- data/test/results/original_engine.xhtml +0 -20
- data/test/results/partial_layout.xhtml +0 -6
- data/test/results/partial_layout_erb.xhtml +0 -6
- data/test/results/partials.xhtml +0 -22
- data/test/results/render_layout.xhtml +0 -3
- data/test/results/silent_script.xhtml +0 -74
- data/test/results/standard.xhtml +0 -159
- data/test/results/tag_parsing.xhtml +0 -23
- data/test/results/very_basic.xhtml +0 -5
- data/test/results/whitespace_handling.xhtml +0 -91
- data/test/template_test_helper.rb +0 -38
- data/test/templates/_av_partial_1.haml +0 -9
- data/test/templates/_av_partial_2.haml +0 -5
- data/test/templates/_layout.erb +0 -3
- data/test/templates/_layout_for_partial.haml +0 -3
- data/test/templates/_partial.haml +0 -8
- data/test/templates/_text_area.haml +0 -3
- data/test/templates/_text_area_helper.html.haml +0 -4
- data/test/templates/action_view.haml +0 -47
- data/test/templates/bemit.haml +0 -3
- data/test/templates/breakage.haml +0 -8
- data/test/templates/content_for_layout.haml +0 -8
- data/test/templates/eval_suppressed.haml +0 -11
- data/test/templates/helpers.haml +0 -55
- data/test/templates/helpful.haml +0 -11
- data/test/templates/just_stuff.haml +0 -86
- data/test/templates/list.haml +0 -12
- data/test/templates/nuke_inner_whitespace.haml +0 -32
- data/test/templates/nuke_outer_whitespace.haml +0 -144
- data/test/templates/original_engine.haml +0 -17
- data/test/templates/partial_layout.haml +0 -3
- data/test/templates/partial_layout_erb.erb +0 -4
- data/test/templates/partialize.haml +0 -1
- data/test/templates/partials.haml +0 -12
- data/test/templates/render_layout.haml +0 -2
- data/test/templates/silent_script.haml +0 -45
- data/test/templates/standard.haml +0 -43
- data/test/templates/standard_ugly.haml +0 -1
- data/test/templates/tag_parsing.haml +0 -21
- data/test/templates/very_basic.haml +0 -4
- data/test/templates/whitespace_handling.haml +0 -87
- data/test/templates/with_bom.haml +0 -1
- data/test/test_helper.rb +0 -99
data/test/markaby/standard.mab
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
self << '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
|
2
|
-
html(:xmlns=>'http://www.w3.org/1999/xhtml', 'xml:lang'=>'en-US') do
|
3
|
-
head do
|
4
|
-
title "Hampton Catlin Is Totally Awesome"
|
5
|
-
meta("http-equiv" => "Content-Type", :content => "text/html; charset=utf-8")
|
6
|
-
end
|
7
|
-
body do
|
8
|
-
# You're In my house now!
|
9
|
-
div :class => "header" do
|
10
|
-
self << %|Yes, ladies and gentileman. He is just that egotistical.
|
11
|
-
Fantastic! This should be multi-line output
|
12
|
-
The question is if this would translate! Ahah!|
|
13
|
-
self << 1 + 9 + 8 + 2 #numbers should work and this should be ignored
|
14
|
-
end
|
15
|
-
div(:id => "body") { self << "Quotes should be loved! Just like people!"}
|
16
|
-
120.times do |number|
|
17
|
-
number
|
18
|
-
end
|
19
|
-
self << "Wow.|"
|
20
|
-
p do
|
21
|
-
self << "Holy cow " +
|
22
|
-
"multiline " +
|
23
|
-
"tags! " +
|
24
|
-
"A pipe (|) even!"
|
25
|
-
self << [1, 2, 3].collect { |n| "PipesIgnored|" }
|
26
|
-
self << [1, 2, 3].collect { |n|
|
27
|
-
n.to_s
|
28
|
-
}.join("|")
|
29
|
-
end
|
30
|
-
div(:class => "silent") do
|
31
|
-
foo = String.new
|
32
|
-
foo << "this"
|
33
|
-
foo << " shouldn't"
|
34
|
-
foo << " evaluate"
|
35
|
-
self << foo + " but now it should!"
|
36
|
-
# Woah crap a comment!
|
37
|
-
end
|
38
|
-
# That was a line that shouldn't close everything.
|
39
|
-
ul(:class => "really cool") do
|
40
|
-
('a'..'f').each do |a|
|
41
|
-
li a
|
42
|
-
end
|
43
|
-
end
|
44
|
-
div((@should_eval = "with this text"), :id => "combo", :class => "of_divs_with_underscore")
|
45
|
-
[ 104, 101, 108, 108, 111 ].map do |byte|
|
46
|
-
byte.chr
|
47
|
-
end
|
48
|
-
div(:class => "footer") do
|
49
|
-
strong("This is a really long ruby quote. It should be loved and wrapped because its more than 50 characters. This value may change in the future and this test may look stupid. \nSo, I'm just making it *really* long. God, I hope this works", :class => "shout")
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
data/test/mocks/article.rb
DELETED
data/test/results/bemit.xhtml
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
-
<html>
|
3
|
-
<head></head>
|
4
|
-
<body>
|
5
|
-
<div id='yieldy'>
|
6
|
-
Lorem ipsum dolor sit amet
|
7
|
-
</div>
|
8
|
-
<div id='nosym'>
|
9
|
-
Lorem ipsum dolor sit amet
|
10
|
-
</div>
|
11
|
-
</body>
|
12
|
-
</html>
|
data/test/results/helpers.xhtml
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
&&&&&&&&&&&
|
2
|
-
<div>
|
3
|
-
<p class='title'>Title</p>
|
4
|
-
<p class='text'>
|
5
|
-
Woah this is really crazy
|
6
|
-
I mean wow,
|
7
|
-
man.
|
8
|
-
</p>
|
9
|
-
</div>
|
10
|
-
|
11
|
-
<div>
|
12
|
-
<p class='title'>Title</p>
|
13
|
-
<p class='text'>
|
14
|
-
Woah this is really crazy
|
15
|
-
I mean wow,
|
16
|
-
man.
|
17
|
-
</p>
|
18
|
-
</div>
|
19
|
-
|
20
|
-
<div>
|
21
|
-
<p class='title'>Title</p>
|
22
|
-
<p class='text'>
|
23
|
-
Woah this is really crazy
|
24
|
-
I mean wow,
|
25
|
-
man.
|
26
|
-
</p>
|
27
|
-
</div>
|
28
|
-
|
29
|
-
<p>foo</p>
|
30
|
-
<p>reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeally loooooooooooooooooong</p>
|
31
|
-
<div class='woah'>
|
32
|
-
<div id='funky'>
|
33
|
-
<div>
|
34
|
-
<h1>Big!</h1>
|
35
|
-
<p>Small</p>
|
36
|
-
<!-- Invisible -->
|
37
|
-
</div>
|
38
|
-
<div class='dilly'>
|
39
|
-
<p>foo</p>
|
40
|
-
<h1>bar</h1>
|
41
|
-
</div>
|
42
|
-
</div>
|
43
|
-
(<strong>parentheses!</strong>)
|
44
|
-
</div>
|
45
|
-
*<span class='small'>Not really</span>
|
46
|
-
click
|
47
|
-
<a href='thing'>here</a>.
|
48
|
-
<p>baz</p>
|
49
|
-
<p>boom</p>
|
50
|
-
foo
|
51
|
-
<li><a href='http://www.google.com'>google</a></li><p>
|
52
|
-
foo
|
53
|
-
<div>
|
54
|
-
bar
|
55
|
-
</div>
|
56
|
-
boom
|
57
|
-
baz
|
58
|
-
boom, again
|
59
|
-
</p>
|
60
|
-
<table>
|
61
|
-
<tr>
|
62
|
-
<td class='cell'>
|
63
|
-
<strong>strong!</strong>
|
64
|
-
data
|
65
|
-
</td>
|
66
|
-
<td>
|
67
|
-
more_data
|
68
|
-
</td>
|
69
|
-
</tr>
|
70
|
-
</table>
|
71
|
-
<hr />
|
72
|
-
<div></div>
|
data/test/results/helpful.xhtml
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
<div class='article' id='article_1'>
|
2
|
-
<h1>Hello</h1>
|
3
|
-
<div>World</div>
|
4
|
-
</div>
|
5
|
-
<div class='article' id='id_article_1'>id</div>
|
6
|
-
<div class='article class' id='article_1'>class</div>
|
7
|
-
<div class='article class' id='id_article_1'>id class</div>
|
8
|
-
<div class='article full' id='article_1'>boo</div>
|
9
|
-
<div class='article full' id='article_1'>moo</div>
|
10
|
-
<div class='article articleFull' id='article_1'>foo</div>
|
11
|
-
<span>
|
12
|
-
Boo
|
13
|
-
</span>
|
@@ -1,71 +0,0 @@
|
|
1
|
-
<?xml version='1.0' encoding='utf-8' ?>
|
2
|
-
<?xml version='1.0' encoding='iso-8859-1' ?>
|
3
|
-
<?xml version='1.0' encoding='utf-8' ?>
|
4
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
6
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
7
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
8
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
9
|
-
<strong apos='Foo's bar!'>Boo!</strong>
|
10
|
-
Embedded? false!
|
11
|
-
Embedded? true!
|
12
|
-
Embedded? true!
|
13
|
-
Embedded? twice! true!
|
14
|
-
Embedded? one af"t"er another!
|
15
|
-
<p>Embedded? false!</p>
|
16
|
-
<p>Embedded? true!</p>
|
17
|
-
<p>Embedded? true!</p>
|
18
|
-
<p>Embedded? twice! true!</p>
|
19
|
-
<p>Embedded? one af"t"er another!</p>
|
20
|
-
stuff followed by whitespace
|
21
|
-
<strong>block with whitespace</strong>
|
22
|
-
<p>
|
23
|
-
Escape
|
24
|
-
- character
|
25
|
-
%p foo
|
26
|
-
yee\ha
|
27
|
-
don't lstrip me
|
28
|
-
</p>
|
29
|
-
<!-- Short comment -->
|
30
|
-
<!--
|
31
|
-
This is a block comment
|
32
|
-
cool, huh?
|
33
|
-
<strong>there can even be sub-tags!</strong>
|
34
|
-
Or script!
|
35
|
-
-->
|
36
|
-
<p class=''>class attribute should appear!</p>
|
37
|
-
<p>this attribute shouldn't appear</p>
|
38
|
-
<!--[if lte IE6]> conditional comment! <![endif]-->
|
39
|
-
<!--[if gte IE7]>
|
40
|
-
<p>Block conditional comment</p>
|
41
|
-
<div>
|
42
|
-
<h1>Cool, eh?</h1>
|
43
|
-
</div>
|
44
|
-
<![endif]-->
|
45
|
-
<!--[if gte IE5.2]>
|
46
|
-
Woah a period.
|
47
|
-
<![endif]-->
|
48
|
-
testtest
|
49
|
-
<br />
|
50
|
-
<meta foo='bar' />
|
51
|
-
<img />
|
52
|
-
<hr />
|
53
|
-
<link />
|
54
|
-
<script>Inline content</script>
|
55
|
-
<br>
|
56
|
-
Nested content
|
57
|
-
</br>
|
58
|
-
<p class='article bar foo' id='article_1'>Blah</p>
|
59
|
-
<p class='article foo' id='article_1'>Blah</p>
|
60
|
-
<p class='article bar baz foo' id='article_1'>Blah</p>
|
61
|
-
<p class='article quux qux' id='article_1'>Blump</p>
|
62
|
-
<p class='article' id='foo_bar_baz_article_1'>Whee</p>
|
63
|
-
Woah inner quotes
|
64
|
-
<p class='dynamic_quote' dyn='3' quotes='single ''></p>
|
65
|
-
<p class='dynamic_self_closing' dyn='3' />
|
66
|
-
<body>
|
67
|
-
hello
|
68
|
-
<div>
|
69
|
-
<img />
|
70
|
-
</div>
|
71
|
-
</body>
|
data/test/results/list.xhtml
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
<p>
|
2
|
-
<q>Foo</q>
|
3
|
-
</p>
|
4
|
-
<p>
|
5
|
-
<q a='2'>Foo</q>
|
6
|
-
</p>
|
7
|
-
<p>
|
8
|
-
<q>Foo
|
9
|
-
Bar</q>
|
10
|
-
</p>
|
11
|
-
<p>
|
12
|
-
<q a='2'>Foo
|
13
|
-
Bar</q>
|
14
|
-
</p>
|
15
|
-
<p>
|
16
|
-
<q>Foo
|
17
|
-
Bar</q>
|
18
|
-
</p>
|
19
|
-
<p>
|
20
|
-
<q a='2'>Foo
|
21
|
-
Bar</q>
|
22
|
-
</p>
|
23
|
-
<p>
|
24
|
-
<q><div>
|
25
|
-
Foo
|
26
|
-
Bar
|
27
|
-
</div></q>
|
28
|
-
</p>
|
29
|
-
<p>
|
30
|
-
<q a='2'><div>
|
31
|
-
Foo
|
32
|
-
Bar
|
33
|
-
</div></q>
|
34
|
-
</p>
|
35
|
-
<p>
|
36
|
-
<q>foo</q>
|
37
|
-
<q a='2'>
|
38
|
-
bar
|
39
|
-
</q>
|
40
|
-
</p>
|
@@ -1,140 +0,0 @@
|
|
1
|
-
<p>
|
2
|
-
<p><q>
|
3
|
-
Foo
|
4
|
-
</q></p>
|
5
|
-
</p>
|
6
|
-
<p>
|
7
|
-
<p><q a='2'>
|
8
|
-
Foo
|
9
|
-
</q></p>
|
10
|
-
</p>
|
11
|
-
<p>
|
12
|
-
<p><q>Foo</q></p>
|
13
|
-
</p>
|
14
|
-
<p>
|
15
|
-
<p><q a='2'>Foo</q></p>
|
16
|
-
</p>
|
17
|
-
<p>
|
18
|
-
<p><q>
|
19
|
-
Foo
|
20
|
-
</q></p>
|
21
|
-
</p>
|
22
|
-
<p>
|
23
|
-
<p><q a='2'>
|
24
|
-
Foo
|
25
|
-
</q></p>
|
26
|
-
</p>
|
27
|
-
<p>
|
28
|
-
<p><q>Foo</q></p>
|
29
|
-
</p>
|
30
|
-
<p>
|
31
|
-
<p><q a='2'>Foo</q></p>
|
32
|
-
</p>
|
33
|
-
<p>
|
34
|
-
<p><q>
|
35
|
-
Foo
|
36
|
-
Bar
|
37
|
-
</q></p>
|
38
|
-
</p>
|
39
|
-
<p>
|
40
|
-
<p><q a='2'>
|
41
|
-
Foo
|
42
|
-
Bar
|
43
|
-
</q></p>
|
44
|
-
</p>
|
45
|
-
<p>
|
46
|
-
<p><q>Foo
|
47
|
-
Bar</q></p>
|
48
|
-
</p>
|
49
|
-
<p>
|
50
|
-
<p><q a='2'>Foo
|
51
|
-
Bar</q></p>
|
52
|
-
</p>
|
53
|
-
<p>
|
54
|
-
<p>
|
55
|
-
foo<q>
|
56
|
-
Foo
|
57
|
-
</q>bar
|
58
|
-
</p>
|
59
|
-
</p>
|
60
|
-
<p>
|
61
|
-
<p>
|
62
|
-
foo<q a='2'>
|
63
|
-
Foo
|
64
|
-
</q>bar
|
65
|
-
</p>
|
66
|
-
</p>
|
67
|
-
<p>
|
68
|
-
<p>
|
69
|
-
foo<q>Foo</q>bar
|
70
|
-
</p>
|
71
|
-
</p>
|
72
|
-
<p>
|
73
|
-
<p>
|
74
|
-
foo<q a='2'>Foo</q>bar
|
75
|
-
</p>
|
76
|
-
</p>
|
77
|
-
<p>
|
78
|
-
<p>
|
79
|
-
foo<q>
|
80
|
-
Foo
|
81
|
-
</q>bar
|
82
|
-
</p>
|
83
|
-
</p>
|
84
|
-
<p>
|
85
|
-
<p>
|
86
|
-
foo<q a='2'>
|
87
|
-
Foo
|
88
|
-
</q>bar
|
89
|
-
</p>
|
90
|
-
</p>
|
91
|
-
<p>
|
92
|
-
<p>
|
93
|
-
foo<q>Foo</q>bar
|
94
|
-
</p>
|
95
|
-
</p>
|
96
|
-
<p>
|
97
|
-
<p>
|
98
|
-
foo<q a='2'>Foo</q>bar
|
99
|
-
</p>
|
100
|
-
</p>
|
101
|
-
<p>
|
102
|
-
<p>
|
103
|
-
foo<q>
|
104
|
-
Foo
|
105
|
-
Bar
|
106
|
-
</q>bar
|
107
|
-
</p>
|
108
|
-
</p>
|
109
|
-
<p>
|
110
|
-
<p>
|
111
|
-
foo<q a='2'>
|
112
|
-
Foo
|
113
|
-
Bar
|
114
|
-
</q>bar
|
115
|
-
</p>
|
116
|
-
</p>
|
117
|
-
<p>
|
118
|
-
<p>
|
119
|
-
foo<q>Foo
|
120
|
-
Bar</q>bar
|
121
|
-
</p>
|
122
|
-
</p>
|
123
|
-
<p>
|
124
|
-
<p>
|
125
|
-
foo<q a='2'>Foo
|
126
|
-
Bar</q>bar
|
127
|
-
</p>
|
128
|
-
</p>
|
129
|
-
<p>
|
130
|
-
<p><q></q></p>
|
131
|
-
</p>
|
132
|
-
<p>
|
133
|
-
<p><q /></p>
|
134
|
-
</p>
|
135
|
-
<p>
|
136
|
-
<p><q a='2'></q></p>
|
137
|
-
</p>
|
138
|
-
<p>
|
139
|
-
<p><q a='2' /></p>
|
140
|
-
</p>
|