haml 1.8.0 → 2.0.3
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.
- data/FAQ +138 -0
- data/MIT-LICENSE +1 -1
- data/{README → README.rdoc} +66 -3
- data/REVISION +1 -0
- data/Rakefile +115 -147
- data/VERSION +1 -1
- data/bin/css2sass +0 -0
- data/bin/haml +2 -1
- data/bin/html2haml +0 -0
- data/bin/sass +0 -0
- data/init.rb +6 -1
- data/lib/haml/buffer.rb +122 -64
- data/lib/haml/engine.rb +77 -46
- data/lib/haml/error.rb +15 -6
- data/lib/haml/exec.rb +61 -10
- data/lib/haml/filters.rb +229 -74
- data/lib/haml/helpers/action_view_extensions.rb +1 -1
- data/lib/haml/helpers/action_view_mods.rb +109 -24
- data/lib/haml/helpers.rb +137 -76
- data/lib/haml/html.rb +8 -8
- data/lib/haml/precompiler.rb +280 -153
- data/lib/haml/template/patch.rb +10 -3
- data/lib/haml/template/plugin.rb +61 -10
- data/lib/haml/template.rb +14 -9
- data/lib/haml.rb +483 -214
- data/lib/sass/constant/color.rb +13 -13
- data/lib/sass/constant/literal.rb +8 -7
- data/lib/sass/constant/nil.rb +9 -0
- data/lib/sass/constant/number.rb +10 -10
- data/lib/sass/constant/operation.rb +4 -4
- data/lib/sass/constant/string.rb +3 -3
- data/lib/sass/constant.rb +46 -77
- data/lib/sass/css.rb +130 -56
- data/lib/sass/engine.rb +131 -43
- data/lib/sass/plugin/merb.rb +48 -12
- data/lib/sass/plugin/rails.rb +10 -4
- data/lib/sass/plugin.rb +33 -10
- data/lib/sass/tree/attr_node.rb +5 -5
- data/lib/sass/tree/directive_node.rb +2 -7
- data/lib/sass/tree/node.rb +1 -12
- data/lib/sass/tree/rule_node.rb +39 -31
- data/lib/sass/tree/value_node.rb +1 -1
- data/lib/sass.rb +194 -19
- data/rails/init.rb +1 -0
- data/test/benchmark.rb +67 -80
- data/test/haml/engine_test.rb +368 -152
- data/test/haml/helper_test.rb +68 -16
- data/test/haml/html2haml_test.rb +3 -4
- data/test/haml/results/content_for_layout.xhtml +1 -2
- data/test/haml/results/eval_suppressed.xhtml +2 -4
- data/test/haml/results/filters.xhtml +38 -30
- data/test/haml/results/helpers.xhtml +4 -8
- data/test/haml/results/just_stuff.xhtml +8 -7
- data/test/haml/results/nuke_inner_whitespace.xhtml +40 -0
- data/test/haml/results/nuke_outer_whitespace.xhtml +148 -0
- data/test/haml/results/original_engine.xhtml +3 -7
- data/test/haml/results/partials.xhtml +1 -0
- data/test/haml/results/tag_parsing.xhtml +1 -6
- data/test/haml/results/very_basic.xhtml +2 -4
- data/test/haml/results/whitespace_handling.xhtml +13 -21
- data/test/haml/template_test.rb +42 -57
- data/test/haml/templates/_partial.haml +1 -0
- data/test/haml/templates/filters.haml +39 -21
- data/test/haml/templates/helpers.haml +10 -10
- data/test/haml/templates/just_stuff.haml +8 -3
- data/test/haml/templates/nuke_inner_whitespace.haml +32 -0
- data/test/haml/templates/nuke_outer_whitespace.haml +144 -0
- data/test/haml/templates/partials.haml +1 -1
- data/test/haml/templates/tag_parsing.haml +0 -3
- data/test/haml/templates/whitespace_handling.haml +10 -10
- data/test/sass/engine_test.rb +97 -39
- data/test/sass/plugin_test.rb +4 -7
- data/test/sass/results/constants.css +2 -0
- data/test/sass/results/import.css +2 -2
- data/test/sass/results/mixins.css +95 -0
- data/test/sass/results/multiline.css +24 -0
- data/test/sass/templates/constants.sass +3 -0
- data/test/sass/templates/import.sass +4 -1
- data/test/sass/templates/importee.sass +4 -0
- data/test/sass/templates/mixins.sass +76 -0
- data/test/sass/templates/multiline.sass +20 -0
- data/test/test_helper.rb +18 -0
- metadata +70 -53
- data/lib/haml/helpers/action_view_mods.rb.rej +0 -30
- data/lib/haml/util.rb +0 -18
- data/lib/sass/constant.rb.rej +0 -42
- data/test/haml/runner.rb +0 -16
- data/test/profile.rb +0 -65
- data/test/sass/engine_test.rb.rej +0 -18
data/test/haml/helper_test.rb
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require 'rubygems'
|
|
4
|
-
require 'active_support'
|
|
5
|
-
require 'action_controller'
|
|
6
|
-
require 'action_view'
|
|
7
|
-
|
|
8
|
-
require 'test/unit'
|
|
9
|
-
require File.dirname(__FILE__) + '/../../lib/haml'
|
|
2
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
|
10
3
|
require 'haml/template'
|
|
11
4
|
|
|
12
5
|
class HelperTest < Test::Unit::TestCase
|
|
13
6
|
include Haml::Helpers
|
|
7
|
+
Post = Struct.new('Post', :body)
|
|
14
8
|
|
|
15
9
|
def setup
|
|
16
10
|
@base = ActionView::Base.new
|
|
17
11
|
@base.controller = ActionController::Base.new
|
|
12
|
+
@base.instance_variable_set('@post', Post.new("Foo bar\nbaz"))
|
|
18
13
|
end
|
|
19
14
|
|
|
20
15
|
def render(text, options = {})
|
|
@@ -27,14 +22,14 @@ class HelperTest < Test::Unit::TestCase
|
|
|
27
22
|
end
|
|
28
23
|
|
|
29
24
|
def test_flatten
|
|
30
|
-
assert_equal(
|
|
25
|
+
assert_equal("FooBar", flatten("FooBar"))
|
|
31
26
|
|
|
32
|
-
assert_equal(flatten("Foo\rBar")
|
|
27
|
+
assert_equal("FooBar", flatten("Foo\rBar"))
|
|
33
28
|
|
|
34
|
-
assert_equal(
|
|
29
|
+
assert_equal("Foo
Bar", flatten("Foo\nBar"))
|
|
35
30
|
|
|
36
|
-
assert_equal(
|
|
37
|
-
|
|
31
|
+
assert_equal("Hello
World!
YOU ARE FLAT?
OMGZ!",
|
|
32
|
+
flatten("Hello\nWorld!\nYOU ARE \rFLAT?\n\rOMGZ!"))
|
|
38
33
|
end
|
|
39
34
|
|
|
40
35
|
def test_list_of_should_render_correctly
|
|
@@ -85,10 +80,49 @@ class HelperTest < Test::Unit::TestCase
|
|
|
85
80
|
should_be = "<form action=\"foo\" method=\"post\">\n <p>bar</p>\n <strong>baz</strong>\n</form>\n"
|
|
86
81
|
assert_equal(should_be, result)
|
|
87
82
|
end
|
|
83
|
+
|
|
84
|
+
def test_text_area
|
|
85
|
+
assert_equal(%(<textarea id="body" name="body">Foo
Bar
 Baz
 Boom</textarea>\n),
|
|
86
|
+
render('= text_area_tag "body", "Foo\nBar\n Baz\n Boom"', :action_view))
|
|
87
|
+
|
|
88
|
+
assert_equal(%(<textarea cols="40" id="post_body" name="post[body]" rows="20">Foo bar
baz</textarea>\n),
|
|
89
|
+
render('= text_area :post, :body', :action_view))
|
|
90
|
+
|
|
91
|
+
assert_equal(%(<pre>Foo bar
 baz</pre>\n),
|
|
92
|
+
render('= content_tag "pre", "Foo bar\n baz"', :action_view))
|
|
93
|
+
end
|
|
88
94
|
|
|
89
95
|
def test_capture_haml
|
|
90
96
|
assert_equal("\"<p>13</p>\\n\"\n", render("- foo = capture_haml(13) do |a|\n %p= a\n= foo.dump"))
|
|
91
97
|
end
|
|
98
|
+
|
|
99
|
+
def test_haml_tag_attribute_html_escaping
|
|
100
|
+
assert_equal("<p id='foo&bar'>baz</p>\n", render("%p{:id => 'foo&bar'} baz", :escape_html => true))
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def test_haml_tag_autoclosed_tags_are_closed
|
|
104
|
+
assert_equal("<br class='foo' />\n", render("- haml_tag :br, :class => 'foo'"))
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
def test_haml_tag_non_autoclosed_tags_arent_closed
|
|
108
|
+
assert_equal("<p></p>\n", render("- haml_tag :p"))
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def test_haml_tag_renders_text_on_a_single_line
|
|
112
|
+
assert_equal("<p>#{'a' * 100}</p>\n", render("- haml_tag :p, 'a' * 100"))
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def test_haml_tag_raises_error_for_multiple_content
|
|
116
|
+
assert_raise(Haml::Error) { render("- haml_tag :p, 'foo' do\n bar") }
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
def test_haml_tag_flags
|
|
120
|
+
assert_equal("<p />\n", render("- haml_tag :p, :/"))
|
|
121
|
+
assert_equal("<p>kumquat</p>\n", render("- haml_tag :p, :< do\n kumquat"))
|
|
122
|
+
|
|
123
|
+
assert_raise(Haml::Error) { render("- haml_tag :p, 'foo', :/") }
|
|
124
|
+
assert_raise(Haml::Error) { render("- haml_tag :p, :/ do\n foo") }
|
|
125
|
+
end
|
|
92
126
|
|
|
93
127
|
def test_is_haml
|
|
94
128
|
assert(!ActionView::Base.new.is_haml?)
|
|
@@ -123,12 +157,12 @@ class HelperTest < Test::Unit::TestCase
|
|
|
123
157
|
end
|
|
124
158
|
|
|
125
159
|
def test_find_and_preserve_with_block
|
|
126
|
-
assert_equal("<pre
|
|
160
|
+
assert_equal("<pre>Foo
Bar</pre>\nFoo\nBar\n",
|
|
127
161
|
render("= find_and_preserve do\n %pre\n Foo\n Bar\n Foo\n Bar"))
|
|
128
162
|
end
|
|
129
163
|
|
|
130
164
|
def test_preserve_with_block
|
|
131
|
-
assert_equal("<pre
|
|
165
|
+
assert_equal("<pre>Foo
Bar</pre>
Foo
Bar\n",
|
|
132
166
|
render("= preserve do\n %pre\n Foo\n Bar\n Foo\n Bar"))
|
|
133
167
|
end
|
|
134
168
|
|
|
@@ -140,12 +174,30 @@ class HelperTest < Test::Unit::TestCase
|
|
|
140
174
|
context.init_haml_helpers
|
|
141
175
|
|
|
142
176
|
result = context.capture_haml do
|
|
143
|
-
context.
|
|
177
|
+
context.haml_tag :p, :attr => "val" do
|
|
144
178
|
context.puts "Blah"
|
|
145
179
|
end
|
|
146
180
|
end
|
|
147
181
|
|
|
148
182
|
assert_equal("<p attr='val'>\n Blah\n</p>\n", result)
|
|
149
183
|
end
|
|
184
|
+
|
|
185
|
+
def test_non_haml
|
|
186
|
+
assert_equal("false\n", render("= non_haml { is_haml? }"))
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
class ActsLikeTag
|
|
190
|
+
# We want to be able to have people include monkeypatched ActionView helpers
|
|
191
|
+
# without redefining is_haml?.
|
|
192
|
+
# This is accomplished via Object#is_haml?, and this is a test for it.
|
|
193
|
+
include ActionView::Helpers::TagHelper
|
|
194
|
+
def to_s
|
|
195
|
+
content_tag :p, 'some tag content'
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
def test_random_class_includes_tag_helper
|
|
200
|
+
assert_equal "<p>some tag content</p>", ActsLikeTag.new.to_s
|
|
201
|
+
end
|
|
150
202
|
end
|
|
151
203
|
|
data/test/haml/html2haml_test.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require 'test/unit'
|
|
4
|
-
require File.dirname(__FILE__) + '/../../lib/haml'
|
|
2
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
|
5
3
|
require 'haml/html'
|
|
6
4
|
|
|
7
5
|
class Html2HamlTest < Test::Unit::TestCase
|
|
@@ -54,7 +52,8 @@ class Html2HamlTest < Test::Unit::TestCase
|
|
|
54
52
|
end
|
|
55
53
|
|
|
56
54
|
def assert_equal_attributes(expected, result)
|
|
57
|
-
|
|
55
|
+
expected_attr, result_attr = [expected, result].map { |s| s.gsub!(/\{ (.+) \}/, ''); $1.split(', ').sort }
|
|
56
|
+
assert_equal expected_attr, result_attr
|
|
58
57
|
assert_equal expected, result
|
|
59
58
|
end
|
|
60
59
|
end
|
|
@@ -1,51 +1,57 @@
|
|
|
1
1
|
<style>
|
|
2
|
-
p {
|
|
3
|
-
border-style: dotted;
|
|
4
|
-
border-width: 10px;
|
|
5
|
-
border-color: #ff00ff; }
|
|
2
|
+
p { border-style: dotted; border-width: 22px; border-color: #ff00ff; }
|
|
6
3
|
|
|
7
|
-
h1 {
|
|
8
|
-
font-weight: normal; }
|
|
4
|
+
h1 { font-weight: normal; }
|
|
9
5
|
</style>
|
|
10
6
|
TESTING HAHAHAHA!
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<h1>Yeah</h1>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<p><em>pretty much the same as above</em></p>
|
|
7
|
+
<p>
|
|
8
|
+
<script type='text/javascript'>
|
|
9
|
+
//<![CDATA[
|
|
10
|
+
function newline(str) {
|
|
11
|
+
return "\n" + str;
|
|
12
|
+
}
|
|
13
|
+
//]]>
|
|
14
|
+
</script>
|
|
15
|
+
</p>
|
|
24
16
|
This
|
|
25
17
|
Is
|
|
26
18
|
Plain
|
|
27
19
|
Text
|
|
28
20
|
%strong right?
|
|
21
|
+
#{not interpolated}
|
|
22
|
+
\3
|
|
23
|
+
\#{also not}
|
|
24
|
+
\\
|
|
25
|
+
<p>
|
|
26
|
+
<pre>This pre is pretty deeply
 nested.
 Does interpolation work?
|
|
27
|
+
This one is, too.
Nested, that is.
</pre>
|
|
28
|
+
</p>
|
|
29
|
+
<ul>
|
|
30
|
+
|
|
31
|
+
<li>a</li>
|
|
32
|
+
|
|
33
|
+
<li>b</li>
|
|
29
34
|
|
|
30
|
-
|
|
35
|
+
<li>c</li>
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
<li>d</li>
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
<li>e</li>
|
|
35
40
|
|
|
36
|
-
|
|
41
|
+
<li>f</li>
|
|
37
42
|
|
|
38
|
-
|
|
43
|
+
<li>g</li>
|
|
39
44
|
|
|
40
|
-
|
|
45
|
+
<li>h</li>
|
|
41
46
|
|
|
42
|
-
|
|
47
|
+
<li>i</li>
|
|
43
48
|
|
|
44
|
-
|
|
49
|
+
<li>j</li>
|
|
45
50
|
|
|
46
|
-
i
|
|
47
51
|
|
|
48
|
-
|
|
52
|
+
|
|
53
|
+
</ul>
|
|
54
|
+
<div class='res'>178</div>
|
|
49
55
|
<ul>
|
|
50
56
|
<li>Foo</li>
|
|
51
57
|
<li>Bar</li>
|
|
@@ -54,4 +60,6 @@ This
|
|
|
54
60
|
Text!
|
|
55
61
|
Hello, World!
|
|
56
62
|
How are you doing today?
|
|
57
|
-
|
|
63
|
+
<div class="foo">
|
|
64
|
+
<p>I think &mdash; or do I?</p>
|
|
65
|
+
</div>
|
|
@@ -24,9 +24,7 @@
|
|
|
24
24
|
</p>
|
|
25
25
|
</div>
|
|
26
26
|
<p>foo</p>
|
|
27
|
-
<p>
|
|
28
|
-
reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeally loooooooooooooooooong
|
|
29
|
-
</p>
|
|
27
|
+
<p>reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeally loooooooooooooooooong</p>
|
|
30
28
|
<div class='woah'>
|
|
31
29
|
<div id='funky'>
|
|
32
30
|
<div>
|
|
@@ -56,6 +54,7 @@ foo
|
|
|
56
54
|
@foo =
|
|
57
55
|
value one
|
|
58
56
|
</p>
|
|
57
|
+
Toplevel? false
|
|
59
58
|
<p>
|
|
60
59
|
@foo =
|
|
61
60
|
value three
|
|
@@ -80,9 +79,7 @@ foo
|
|
|
80
79
|
<table>
|
|
81
80
|
<tr>
|
|
82
81
|
<td class='cell'>
|
|
83
|
-
<strong>
|
|
84
|
-
strong!
|
|
85
|
-
</strong>
|
|
82
|
+
<strong>strong!</strong>
|
|
86
83
|
data
|
|
87
84
|
</td>
|
|
88
85
|
<td>
|
|
@@ -91,5 +88,4 @@ foo
|
|
|
91
88
|
</tr>
|
|
92
89
|
</table>
|
|
93
90
|
<hr />
|
|
94
|
-
<div>
|
|
95
|
-
</div>
|
|
91
|
+
<div></div>
|
|
@@ -17,7 +17,6 @@ Embedded? one af"t"er another!
|
|
|
17
17
|
<p>Embedded? true!</p>
|
|
18
18
|
<p>Embedded? twice! true!</p>
|
|
19
19
|
<p>Embedded? one af"t"er another!</p>
|
|
20
|
-
<div class='render'><em>wow!</em></div>
|
|
21
20
|
stuff followed by whitespace
|
|
22
21
|
<strong>block with whitespace</strong>
|
|
23
22
|
<p>
|
|
@@ -27,9 +26,6 @@ stuff followed by whitespace
|
|
|
27
26
|
yee\ha
|
|
28
27
|
</p>
|
|
29
28
|
<!-- Short comment -->
|
|
30
|
-
<!--
|
|
31
|
-
This is a really long comment look how long it is it should be on a line of its own don't you think?
|
|
32
|
-
-->
|
|
33
29
|
<!--
|
|
34
30
|
This is a block comment
|
|
35
31
|
cool, huh?
|
|
@@ -62,6 +58,11 @@ testtest
|
|
|
62
58
|
<p class='article foo' id='article_1'>Blah</p>
|
|
63
59
|
<p class='article quux qux' id='article_1'>Blump</p>
|
|
64
60
|
Woah inner quotes
|
|
65
|
-
<p class='dynamic_quote' dyn='3' quotes="single '">
|
|
66
|
-
|
|
67
|
-
<
|
|
61
|
+
<p class='dynamic_quote' dyn='3' quotes="single '"></p>
|
|
62
|
+
<p class='dynamic_self_closing' dyn='3' />
|
|
63
|
+
<body>
|
|
64
|
+
hello
|
|
65
|
+
<div>
|
|
66
|
+
<img />
|
|
67
|
+
</div>
|
|
68
|
+
</body>
|
|
@@ -0,0 +1,40 @@
|
|
|
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>
|
|
@@ -0,0 +1,148 @@
|
|
|
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>
|
|
47
|
+
Foo
|
|
48
|
+
Bar
|
|
49
|
+
</q></p>
|
|
50
|
+
</p>
|
|
51
|
+
<p>
|
|
52
|
+
<p><q a='2'>
|
|
53
|
+
Foo
|
|
54
|
+
Bar
|
|
55
|
+
</q></p>
|
|
56
|
+
</p>
|
|
57
|
+
<p>
|
|
58
|
+
<p>
|
|
59
|
+
foo<q>
|
|
60
|
+
Foo
|
|
61
|
+
</q>bar
|
|
62
|
+
</p>
|
|
63
|
+
</p>
|
|
64
|
+
<p>
|
|
65
|
+
<p>
|
|
66
|
+
foo<q a='2'>
|
|
67
|
+
Foo
|
|
68
|
+
</q>bar
|
|
69
|
+
</p>
|
|
70
|
+
</p>
|
|
71
|
+
<p>
|
|
72
|
+
<p>
|
|
73
|
+
foo<q>Foo</q>bar
|
|
74
|
+
</p>
|
|
75
|
+
</p>
|
|
76
|
+
<p>
|
|
77
|
+
<p>
|
|
78
|
+
foo<q a='2'>Foo</q>bar
|
|
79
|
+
</p>
|
|
80
|
+
</p>
|
|
81
|
+
<p>
|
|
82
|
+
<p>
|
|
83
|
+
foo<q>
|
|
84
|
+
Foo
|
|
85
|
+
</q>bar
|
|
86
|
+
</p>
|
|
87
|
+
</p>
|
|
88
|
+
<p>
|
|
89
|
+
<p>
|
|
90
|
+
foo<q a='2'>
|
|
91
|
+
Foo
|
|
92
|
+
</q>bar
|
|
93
|
+
</p>
|
|
94
|
+
</p>
|
|
95
|
+
<p>
|
|
96
|
+
<p>
|
|
97
|
+
foo<q>Foo</q>bar
|
|
98
|
+
</p>
|
|
99
|
+
</p>
|
|
100
|
+
<p>
|
|
101
|
+
<p>
|
|
102
|
+
foo<q a='2'>Foo</q>bar
|
|
103
|
+
</p>
|
|
104
|
+
</p>
|
|
105
|
+
<p>
|
|
106
|
+
<p>
|
|
107
|
+
foo<q>
|
|
108
|
+
Foo
|
|
109
|
+
Bar
|
|
110
|
+
</q>bar
|
|
111
|
+
</p>
|
|
112
|
+
</p>
|
|
113
|
+
<p>
|
|
114
|
+
<p>
|
|
115
|
+
foo<q a='2'>
|
|
116
|
+
Foo
|
|
117
|
+
Bar
|
|
118
|
+
</q>bar
|
|
119
|
+
</p>
|
|
120
|
+
</p>
|
|
121
|
+
<p>
|
|
122
|
+
<p>
|
|
123
|
+
foo<q>
|
|
124
|
+
Foo
|
|
125
|
+
Bar
|
|
126
|
+
</q>bar
|
|
127
|
+
</p>
|
|
128
|
+
</p>
|
|
129
|
+
<p>
|
|
130
|
+
<p>
|
|
131
|
+
foo<q a='2'>
|
|
132
|
+
Foo
|
|
133
|
+
Bar
|
|
134
|
+
</q>bar
|
|
135
|
+
</p>
|
|
136
|
+
</p>
|
|
137
|
+
<p>
|
|
138
|
+
<p><q></q></p>
|
|
139
|
+
</p>
|
|
140
|
+
<p>
|
|
141
|
+
<p><q /></p>
|
|
142
|
+
</p>
|
|
143
|
+
<p>
|
|
144
|
+
<p><q a='2'></q></p>
|
|
145
|
+
</p>
|
|
146
|
+
<p>
|
|
147
|
+
<p><q a='2' /></p>
|
|
148
|
+
</p>
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
<title>Stop. haml time</title>
|
|
5
5
|
<div id='content'>
|
|
6
6
|
<h1>This is a title!</h1>
|
|
7
|
-
<p>
|
|
8
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit
|
|
9
|
-
</p>
|
|
7
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
|
|
10
8
|
<p class='foo'>Cigarettes!</p>
|
|
11
9
|
<h2>Man alive!</h2>
|
|
12
10
|
<ul class='things'>
|
|
@@ -15,10 +13,8 @@
|
|
|
15
13
|
<li>Bathrobe</li>
|
|
16
14
|
<li>Coffee</li>
|
|
17
15
|
</ul>
|
|
18
|
-
<pre>
|
|
19
|
-
|
|
20
|
-
Let's see what happens when it's rendered! What about now, since we're on a new line?
|
|
21
|
-
</pre>
|
|
16
|
+
<pre>This is some text that's in a pre block!
|
|
17
|
+
Let's see what happens when it's rendered! What about now, since we're on a new line?</pre>
|
|
22
18
|
</div>
|
|
23
19
|
</head>
|
|
24
20
|
</html>
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
<foo2u>11</foo2u>
|
|
13
13
|
</div>
|
|
14
14
|
<div class='classes'>
|
|
15
|
-
<p class='foo bar' id='boom'>
|
|
16
|
-
</p>
|
|
15
|
+
<p class='foo bar' id='boom'></p>
|
|
17
16
|
<div class='fooBar'>a</div>
|
|
18
17
|
<div class='foo-bar'>b</div>
|
|
19
18
|
<div class='foo_bar'>c</div>
|
|
@@ -22,7 +21,3 @@
|
|
|
22
21
|
<div class='123'>f</div>
|
|
23
22
|
<div class='foo2u'>g</div>
|
|
24
23
|
</div>
|
|
25
|
-
<div class='broken'>
|
|
26
|
-
<foo><{ :a => :b }</foo>
|
|
27
|
-
<div class='foo'>>{ :c => :d }</div>
|
|
28
|
-
</div>
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
<div class='text_area_test_area'>
|
|
13
13
|
<textarea>Oneline</textarea>
|
|
14
14
|
</div>
|
|
15
|
-
<textarea>BLAH
|
|
15
|
+
<textarea>BLAH</textarea>
|
|
16
16
|
<div class='text_area_test_area'>
|
|
17
17
|
<textarea>Two
lines</textarea>
|
|
18
18
|
</div>
|
|
19
|
-
<textarea>BLAH
|
|
19
|
+
<textarea>BLAH</textarea>
|
|
20
20
|
<div id='flattened'>
|
|
21
21
|
<div class='text_area_test_area'>
|
|
22
22
|
<textarea>Two
lines</textarea>
|
|
23
23
|
</div>
|
|
24
|
-
<textarea>BLAH
|
|
24
|
+
<textarea>BLAH</textarea>
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
27
|
<div class='hithere'>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
</div>
|
|
37
37
|
<div class='foo'>
|
|
38
38
|
13
|
|
39
|
-
<textarea>
a
|
|
39
|
+
<textarea>
a</textarea><textarea>
b</textarea><textarea>
c</textarea>
|
|
40
40
|
</div>
|
|
41
41
|
<div id='whitespace_test'>
|
|
42
42
|
<div class='text_area_test_area'>
|
|
@@ -52,16 +52,16 @@
|
|
|
52
52
|
<div class='text_area_test_area'>
|
|
53
53
|
<textarea>Oneline</textarea>
|
|
54
54
|
</div>
|
|
55
|
-
<textarea>BLAH
|
|
55
|
+
<textarea>BLAH</textarea>
|
|
56
56
|
<div class='text_area_test_area'>
|
|
57
57
|
<textarea>Two
lines</textarea>
|
|
58
58
|
</div>
|
|
59
|
-
<textarea>BLAH
|
|
59
|
+
<textarea>BLAH</textarea>
|
|
60
60
|
<div id='flattened'>
|
|
61
61
|
<div class='text_area_test_area'>
|
|
62
62
|
<textarea>Two
lines</textarea>
|
|
63
63
|
</div>
|
|
64
|
-
<textarea>BLAH
|
|
64
|
+
<textarea>BLAH</textarea>
|
|
65
65
|
</div>
|
|
66
66
|
</div>
|
|
67
67
|
<div class='hithere'>
|
|
@@ -73,22 +73,14 @@
|
|
|
73
73
|
foo
|
|
74
74
|
bar
|
|
75
75
|
</p>
|
|
76
|
-
<pre>
|
|
77
|
-
___
 ,o88888
 ,o8888888'
 ,:o:o:oooo. ,8O88Pd8888"
 ,.::.::o:ooooOoOoO. ,oO8O8Pd888'"
 ,.:.::o:ooOoOoOO8O8OOo.8OOPd8O8O"
 , ..:.::o:ooOoOOOO8OOOOo.FdO8O8"
 , ..:.::o:ooOoOO8O888O8O,COCOO"
 , . ..:.::o:ooOoOOOO8OOOOCOCO"
 . ..:.::o:ooOoOoOO8O8OCCCC"o
 . ..:.::o:ooooOoCoCCC"o:o
 . ..:.::o:o:,cooooCo"oo:o:
 ` . . ..:.:cocoooo"'o:o:::'
 .` . ..::ccccoc"'o:o:o:::'
 :.:. ,c:cccc"':.:.:.:.:.'
 ..:.:"'`::::c:"'..:.:.:.:.:.' http://www.chris.com/ASCII/
 ...:.'.:.::::"' . . . . .'
 .. . ....:."' ` . . . ''
 . . . ...."'
 .. . ."' -hrr-
 .


 It's a planet!
%strong This shouldn't be bold!

|
|
78
|
-
</pre>
|
|
76
|
+
<pre> ___
 ,o88888
 ,o8888888'
 ,:o:o:oooo. ,8O88Pd8888"
 ,.::.::o:ooooOoOoO. ,oO8O8Pd888'"
 ,.:.::o:ooOoOoOO8O8OOo.8OOPd8O8O"
 , ..:.::o:ooOoOOOO8OOOOo.FdO8O8"
 , ..:.::o:ooOoOO8O888O8O,COCOO"
 , . ..:.::o:ooOoOOOO8OOOOCOCO"
 . ..:.::o:ooOoOoOO8O8OCCCC"o
 . ..:.::o:ooooOoCoCCC"o:o
 . ..:.::o:o:,cooooCo"oo:o:
 ` . . ..:.:cocoooo"'o:o:::'
 .` . ..::ccccoc"'o:o:o:::'
 :.:. ,c:cccc"':.:.:.:.:.'
 ..:.:"'`::::c:"'..:.:.:.:.:.' http://www.chris.com/ASCII/
 ...:.'.:.::::"' . . . . .'
 .. . ....:."' ` . . . ''
 . . . ...."'
 .. . ."' -hrr-
 .


 It's a planet!
%strong This shouldn't be bold!</pre>
|
|
79
77
|
<strong>This should!</strong>
|
|
80
|
-
<textarea>
|
|
81
|
-
|
|
82
|
-
<strong>indeed!</strong>
|
|
83
|
-
</textarea>
|
|
78
|
+
<textarea> ___ ___ ___ ___ 
 /\__\ /\ \ /\__\ /\__\
 /:/ / /::\ \ /::| | /:/ /
 /:/__/ /:/\:\ \ /:|:| | /:/ / 
 /::\ \ ___ /::\~\:\ \ /:/|:|__|__ /:/ / 
 /:/\:\ /\__\ /:/\:\ \:\__\ /:/ |::::\__\ /:/__/ 
 \/__\:\/:/ / \/__\:\/:/ / \/__/~~/:/ / \:\ \ 
 \::/ / \::/ / /:/ / \:\ \ 
 /:/ / /:/ / /:/ / \:\ \ 
 /:/ / /:/ / /:/ / \:\__\
 \/__/ \/__/ \/__/ \/__/
 
 Many
 thanks
 to
 http://www.network-science.de/ascii/
|
|
79
|
+
<strong>indeed!</strong></textarea>
|
|
84
80
|
</div>
|
|
85
81
|
<div class='foo'>
|
|
86
82
|
13
|
|
87
83
|
</div>
|
|
88
|
-
<pre>
|
|
89
|
-
|
|
90
|
-
</pre>
|
|
91
|
-
<pre>
|
|
92
|
-
foo

|
|
93
|
-
bar
|
|
94
|
-
</pre>
|
|
84
|
+
<pre> __ ______ __ ______
.----.| |--.|__ |.----.| |--..--------.| __ |
| __|| ||__ || __|| < | || __ |
|____||__|__||______||____||__|__||__|__|__||______|</pre>
|
|
85
|
+
<pre>foo
|
|
86
|
+
bar</pre>
|