merbjedi-haml 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/FAQ +138 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +332 -0
- data/REVISION +1 -0
- data/Rakefile +184 -0
- data/VERSION +1 -0
- data/bin/css2sass +7 -0
- data/bin/haml +9 -0
- data/bin/html2haml +7 -0
- data/bin/sass +8 -0
- data/extra/haml-mode.el +434 -0
- data/extra/sass-mode.el +98 -0
- data/init.rb +8 -0
- data/lib/haml.rb +1025 -0
- data/lib/haml/buffer.rb +255 -0
- data/lib/haml/engine.rb +268 -0
- data/lib/haml/error.rb +22 -0
- data/lib/haml/exec.rb +395 -0
- data/lib/haml/filters.rb +276 -0
- data/lib/haml/helpers.rb +465 -0
- data/lib/haml/helpers/action_view_extensions.rb +45 -0
- data/lib/haml/helpers/action_view_mods.rb +181 -0
- data/lib/haml/html.rb +218 -0
- data/lib/haml/precompiler.rb +896 -0
- data/lib/haml/shared.rb +45 -0
- data/lib/haml/template.rb +51 -0
- data/lib/haml/template/patch.rb +58 -0
- data/lib/haml/template/plugin.rb +72 -0
- data/lib/haml/util.rb +77 -0
- data/lib/haml/version.rb +47 -0
- data/lib/sass.rb +1062 -0
- data/lib/sass/css.rb +388 -0
- data/lib/sass/engine.rb +501 -0
- data/lib/sass/environment.rb +33 -0
- data/lib/sass/error.rb +35 -0
- data/lib/sass/plugin.rb +203 -0
- data/lib/sass/plugin/merb.rb +56 -0
- data/lib/sass/plugin/rails.rb +24 -0
- data/lib/sass/repl.rb +44 -0
- data/lib/sass/script.rb +38 -0
- data/lib/sass/script/bool.rb +13 -0
- data/lib/sass/script/color.rb +97 -0
- data/lib/sass/script/funcall.rb +28 -0
- data/lib/sass/script/functions.rb +122 -0
- data/lib/sass/script/lexer.rb +144 -0
- data/lib/sass/script/literal.rb +60 -0
- data/lib/sass/script/number.rb +231 -0
- data/lib/sass/script/operation.rb +30 -0
- data/lib/sass/script/parser.rb +142 -0
- data/lib/sass/script/string.rb +42 -0
- data/lib/sass/script/unary_operation.rb +21 -0
- data/lib/sass/script/variable.rb +20 -0
- data/lib/sass/tree/attr_node.rb +64 -0
- data/lib/sass/tree/comment_node.rb +30 -0
- data/lib/sass/tree/debug_node.rb +22 -0
- data/lib/sass/tree/directive_node.rb +50 -0
- data/lib/sass/tree/file_node.rb +27 -0
- data/lib/sass/tree/for_node.rb +29 -0
- data/lib/sass/tree/if_node.rb +27 -0
- data/lib/sass/tree/mixin_def_node.rb +18 -0
- data/lib/sass/tree/mixin_node.rb +34 -0
- data/lib/sass/tree/node.rb +97 -0
- data/lib/sass/tree/rule_node.rb +120 -0
- data/lib/sass/tree/variable_node.rb +24 -0
- data/lib/sass/tree/while_node.rb +20 -0
- data/rails/init.rb +1 -0
- data/test/benchmark.rb +99 -0
- data/test/haml/engine_test.rb +852 -0
- data/test/haml/helper_test.rb +224 -0
- data/test/haml/html2haml_test.rb +92 -0
- data/test/haml/markaby/standard.mab +52 -0
- data/test/haml/mocks/article.rb +6 -0
- data/test/haml/results/content_for_layout.xhtml +15 -0
- data/test/haml/results/eval_suppressed.xhtml +9 -0
- data/test/haml/results/filters.xhtml +62 -0
- data/test/haml/results/helpers.xhtml +93 -0
- data/test/haml/results/helpful.xhtml +10 -0
- data/test/haml/results/just_stuff.xhtml +68 -0
- data/test/haml/results/list.xhtml +12 -0
- 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 +20 -0
- data/test/haml/results/partial_layout.xhtml +5 -0
- data/test/haml/results/partials.xhtml +21 -0
- data/test/haml/results/render_layout.xhtml +3 -0
- data/test/haml/results/silent_script.xhtml +74 -0
- data/test/haml/results/standard.xhtml +42 -0
- data/test/haml/results/tag_parsing.xhtml +23 -0
- data/test/haml/results/very_basic.xhtml +5 -0
- data/test/haml/results/whitespace_handling.xhtml +89 -0
- 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 +54 -0
- data/test/haml/template_test.rb +204 -0
- data/test/haml/templates/_av_partial_1.haml +9 -0
- data/test/haml/templates/_av_partial_1_ugly.haml +9 -0
- data/test/haml/templates/_av_partial_2.haml +5 -0
- data/test/haml/templates/_av_partial_2_ugly.haml +5 -0
- data/test/haml/templates/_layout.erb +3 -0
- data/test/haml/templates/_layout_for_partial.haml +3 -0
- data/test/haml/templates/_partial.haml +8 -0
- data/test/haml/templates/_text_area.haml +3 -0
- data/test/haml/templates/action_view.haml +47 -0
- data/test/haml/templates/action_view_ugly.haml +47 -0
- data/test/haml/templates/breakage.haml +8 -0
- data/test/haml/templates/content_for_layout.haml +10 -0
- data/test/haml/templates/eval_suppressed.haml +11 -0
- data/test/haml/templates/filters.haml +66 -0
- data/test/haml/templates/helpers.haml +95 -0
- data/test/haml/templates/helpful.haml +11 -0
- data/test/haml/templates/just_stuff.haml +83 -0
- data/test/haml/templates/list.haml +12 -0
- data/test/haml/templates/nuke_inner_whitespace.haml +32 -0
- data/test/haml/templates/nuke_outer_whitespace.haml +144 -0
- data/test/haml/templates/original_engine.haml +17 -0
- data/test/haml/templates/partial_layout.haml +3 -0
- data/test/haml/templates/partialize.haml +1 -0
- data/test/haml/templates/partials.haml +12 -0
- data/test/haml/templates/render_layout.haml +2 -0
- data/test/haml/templates/silent_script.haml +40 -0
- data/test/haml/templates/standard.haml +42 -0
- data/test/haml/templates/standard_ugly.haml +42 -0
- data/test/haml/templates/tag_parsing.haml +21 -0
- data/test/haml/templates/very_basic.haml +4 -0
- data/test/haml/templates/whitespace_handling.haml +87 -0
- data/test/linked_rails.rb +12 -0
- data/test/sass/css2sass_test.rb +193 -0
- data/test/sass/engine_test.rb +752 -0
- data/test/sass/functions_test.rb +96 -0
- data/test/sass/more_results/more1.css +9 -0
- data/test/sass/more_results/more1_with_line_comments.css +26 -0
- data/test/sass/more_results/more_import.css +29 -0
- data/test/sass/more_templates/_more_partial.sass +2 -0
- data/test/sass/more_templates/more1.sass +23 -0
- data/test/sass/more_templates/more_import.sass +11 -0
- data/test/sass/plugin_test.rb +208 -0
- data/test/sass/results/alt.css +4 -0
- data/test/sass/results/basic.css +9 -0
- data/test/sass/results/compact.css +5 -0
- data/test/sass/results/complex.css +87 -0
- data/test/sass/results/compressed.css +1 -0
- data/test/sass/results/expanded.css +19 -0
- data/test/sass/results/import.css +29 -0
- data/test/sass/results/line_numbers.css +49 -0
- data/test/sass/results/mixins.css +95 -0
- data/test/sass/results/multiline.css +24 -0
- data/test/sass/results/nested.css +22 -0
- data/test/sass/results/parent_ref.css +13 -0
- data/test/sass/results/script.css +16 -0
- data/test/sass/results/subdir/nested_subdir/nested_subdir.css +1 -0
- data/test/sass/results/subdir/subdir.css +3 -0
- data/test/sass/results/units.css +11 -0
- data/test/sass/script_test.rb +152 -0
- data/test/sass/templates/_partial.sass +2 -0
- data/test/sass/templates/alt.sass +16 -0
- data/test/sass/templates/basic.sass +23 -0
- data/test/sass/templates/bork.sass +2 -0
- data/test/sass/templates/bork2.sass +2 -0
- data/test/sass/templates/compact.sass +17 -0
- data/test/sass/templates/complex.sass +309 -0
- data/test/sass/templates/compressed.sass +15 -0
- data/test/sass/templates/expanded.sass +17 -0
- data/test/sass/templates/import.sass +11 -0
- data/test/sass/templates/importee.sass +19 -0
- data/test/sass/templates/line_numbers.sass +13 -0
- data/test/sass/templates/mixins.sass +76 -0
- data/test/sass/templates/multiline.sass +20 -0
- data/test/sass/templates/nested.sass +25 -0
- data/test/sass/templates/parent_ref.sass +25 -0
- data/test/sass/templates/script.sass +101 -0
- data/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +2 -0
- data/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +3 -0
- data/test/sass/templates/subdir/subdir.sass +6 -0
- data/test/sass/templates/units.sass +11 -0
- data/test/test_helper.rb +21 -0
- metadata +273 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
%p
|
2
|
+
%q< Foo
|
3
|
+
%p
|
4
|
+
%q{:a => 1 + 1}< Foo
|
5
|
+
%p
|
6
|
+
%q<= "Foo\nBar"
|
7
|
+
%p
|
8
|
+
%q{:a => 1 + 1}<= "Foo\nBar"
|
9
|
+
%p
|
10
|
+
%q<
|
11
|
+
Foo
|
12
|
+
Bar
|
13
|
+
%p
|
14
|
+
%q{:a => 1 + 1}<
|
15
|
+
Foo
|
16
|
+
Bar
|
17
|
+
%p
|
18
|
+
%q<
|
19
|
+
%div
|
20
|
+
Foo
|
21
|
+
Bar
|
22
|
+
%p
|
23
|
+
%q{:a => 1 + 1}<
|
24
|
+
%div
|
25
|
+
Foo
|
26
|
+
Bar
|
27
|
+
|
28
|
+
-# Regression test
|
29
|
+
%p
|
30
|
+
%q<= "foo"
|
31
|
+
%q{:a => 1 + 1}
|
32
|
+
bar
|
@@ -0,0 +1,144 @@
|
|
1
|
+
%p
|
2
|
+
%p
|
3
|
+
%q>
|
4
|
+
Foo
|
5
|
+
%p
|
6
|
+
%p
|
7
|
+
%q{:a => 1 + 1}>
|
8
|
+
Foo
|
9
|
+
%p
|
10
|
+
%p
|
11
|
+
%q> Foo
|
12
|
+
%p
|
13
|
+
%p
|
14
|
+
%q{:a => 1 + 1}> Foo
|
15
|
+
%p
|
16
|
+
%p
|
17
|
+
%q>
|
18
|
+
= "Foo"
|
19
|
+
%p
|
20
|
+
%p
|
21
|
+
%q{:a => 1 + 1}>
|
22
|
+
= "Foo"
|
23
|
+
%p
|
24
|
+
%p
|
25
|
+
%q>= "Foo"
|
26
|
+
%p
|
27
|
+
%p
|
28
|
+
%q{:a => 1 + 1}>= "Foo"
|
29
|
+
%p
|
30
|
+
%p
|
31
|
+
%q>
|
32
|
+
= "Foo\nBar"
|
33
|
+
%p
|
34
|
+
%p
|
35
|
+
%q{:a => 1 + 1}>
|
36
|
+
= "Foo\nBar"
|
37
|
+
%p
|
38
|
+
%p
|
39
|
+
%q>= "Foo\nBar"
|
40
|
+
%p
|
41
|
+
%p
|
42
|
+
%q{:a => 1 + 1}>= "Foo\nBar"
|
43
|
+
%p
|
44
|
+
%p
|
45
|
+
- tab_up
|
46
|
+
foo
|
47
|
+
%q>
|
48
|
+
Foo
|
49
|
+
bar
|
50
|
+
- tab_down
|
51
|
+
%p
|
52
|
+
%p
|
53
|
+
- tab_up
|
54
|
+
foo
|
55
|
+
%q{:a => 1 + 1}>
|
56
|
+
Foo
|
57
|
+
bar
|
58
|
+
- tab_down
|
59
|
+
%p
|
60
|
+
%p
|
61
|
+
- tab_up
|
62
|
+
foo
|
63
|
+
%q> Foo
|
64
|
+
bar
|
65
|
+
- tab_down
|
66
|
+
%p
|
67
|
+
%p
|
68
|
+
- tab_up
|
69
|
+
foo
|
70
|
+
%q{:a => 1 + 1}> Foo
|
71
|
+
bar
|
72
|
+
- tab_down
|
73
|
+
%p
|
74
|
+
%p
|
75
|
+
- tab_up
|
76
|
+
foo
|
77
|
+
%q>
|
78
|
+
= "Foo"
|
79
|
+
bar
|
80
|
+
- tab_down
|
81
|
+
%p
|
82
|
+
%p
|
83
|
+
- tab_up
|
84
|
+
foo
|
85
|
+
%q{:a => 1 + 1}>
|
86
|
+
= "Foo"
|
87
|
+
bar
|
88
|
+
- tab_down
|
89
|
+
%p
|
90
|
+
%p
|
91
|
+
- tab_up
|
92
|
+
foo
|
93
|
+
%q>= "Foo"
|
94
|
+
bar
|
95
|
+
- tab_down
|
96
|
+
%p
|
97
|
+
%p
|
98
|
+
- tab_up
|
99
|
+
foo
|
100
|
+
%q{:a => 1 + 1}>= "Foo"
|
101
|
+
bar
|
102
|
+
- tab_down
|
103
|
+
%p
|
104
|
+
%p
|
105
|
+
- tab_up
|
106
|
+
foo
|
107
|
+
%q>
|
108
|
+
= "Foo\nBar"
|
109
|
+
bar
|
110
|
+
- tab_down
|
111
|
+
%p
|
112
|
+
%p
|
113
|
+
- tab_up
|
114
|
+
foo
|
115
|
+
%q{:a => 1 + 1}>
|
116
|
+
= "Foo\nBar"
|
117
|
+
bar
|
118
|
+
- tab_down
|
119
|
+
%p
|
120
|
+
%p
|
121
|
+
- tab_up
|
122
|
+
foo
|
123
|
+
%q>= "Foo\nBar"
|
124
|
+
bar
|
125
|
+
- tab_down
|
126
|
+
%p
|
127
|
+
%p
|
128
|
+
- tab_up
|
129
|
+
foo
|
130
|
+
%q{:a => 1 + 1}>= "Foo\nBar"
|
131
|
+
bar
|
132
|
+
- tab_down
|
133
|
+
%p
|
134
|
+
%p
|
135
|
+
%q>
|
136
|
+
%p
|
137
|
+
%p
|
138
|
+
%q>/
|
139
|
+
%p
|
140
|
+
%p
|
141
|
+
%q{:a => 1 + 1}>
|
142
|
+
%p
|
143
|
+
%p
|
144
|
+
%q{:a => 1 + 1}>/
|
@@ -0,0 +1,17 @@
|
|
1
|
+
!!!
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%title Stop. haml time
|
5
|
+
#content
|
6
|
+
%h1 This is a title!
|
7
|
+
%p Lorem ipsum dolor sit amet, consectetur adipisicing elit
|
8
|
+
%p{:class => 'foo'} Cigarettes!
|
9
|
+
%h2 Man alive!
|
10
|
+
%ul.things
|
11
|
+
%li Slippers
|
12
|
+
%li Shoes
|
13
|
+
%li Bathrobe
|
14
|
+
%li Coffee
|
15
|
+
%pre
|
16
|
+
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?
|
@@ -0,0 +1 @@
|
|
1
|
+
= render :file => "#{name}.haml"
|
@@ -0,0 +1,40 @@
|
|
1
|
+
%div
|
2
|
+
%h1 I can count!
|
3
|
+
- (1..20).each do |i|
|
4
|
+
= i
|
5
|
+
%h1 I know my ABCs!
|
6
|
+
%ul
|
7
|
+
- ('a'..'z').each do |i|
|
8
|
+
%li= i
|
9
|
+
%h1 I can catch errors!
|
10
|
+
- begin
|
11
|
+
- String.silly
|
12
|
+
- rescue NameError => e
|
13
|
+
= "Oh no! \"#{e}\" happened!"
|
14
|
+
%p
|
15
|
+
"false" is:
|
16
|
+
- if false
|
17
|
+
= "true"
|
18
|
+
- else
|
19
|
+
= "false"
|
20
|
+
- if true
|
21
|
+
- 5.times do |i|
|
22
|
+
- if i % 2 == 1
|
23
|
+
Odd!
|
24
|
+
- else
|
25
|
+
Even!
|
26
|
+
- else
|
27
|
+
= "This can't happen!"
|
28
|
+
- 13 |
|
29
|
+
.foo
|
30
|
+
%strong foobar
|
31
|
+
- 5.times |
|
32
|
+
do |
|
33
|
+
|a| |
|
34
|
+
%strong= a
|
35
|
+
.test
|
36
|
+
- "foo |
|
37
|
+
bar |
|
38
|
+
baz" |
|
39
|
+
|
40
|
+
%p boom
|
@@ -0,0 +1,42 @@
|
|
1
|
+
!!!
|
2
|
+
%html{html_attrs}
|
3
|
+
%head
|
4
|
+
%title Hampton Catlin Is Totally Awesome
|
5
|
+
%meta{"http-equiv" => "Content-Type", :content => "text/html; charset=utf-8"}
|
6
|
+
%body
|
7
|
+
/ You're In my house now!
|
8
|
+
.header
|
9
|
+
Yes, ladies and gentileman. He is just that egotistical.
|
10
|
+
Fantastic! This should be multi-line output
|
11
|
+
The question is if this would translate! Ahah!
|
12
|
+
= 1 + 9 + 8 + 2 #numbers should work and this should be ignored
|
13
|
+
#body= " Quotes should be loved! Just like people!"
|
14
|
+
- 120.times do |number|
|
15
|
+
- number
|
16
|
+
Wow.|
|
17
|
+
%p
|
18
|
+
= "Holy cow " + |
|
19
|
+
"multiline " + |
|
20
|
+
"tags! " + |
|
21
|
+
"A pipe (|) even!" |
|
22
|
+
= [1, 2, 3].collect { |n| "PipesIgnored|" }.join
|
23
|
+
= [1, 2, 3].collect { |n| |
|
24
|
+
n.to_s |
|
25
|
+
}.join("|") |
|
26
|
+
%div.silent
|
27
|
+
- foo = String.new
|
28
|
+
- foo << "this"
|
29
|
+
- foo << " shouldn't"
|
30
|
+
- foo << " evaluate"
|
31
|
+
= foo + " but now it should!"
|
32
|
+
-# Woah crap a comment!
|
33
|
+
|
34
|
+
-# That was a line that shouldn't close everything.
|
35
|
+
%ul.really.cool
|
36
|
+
- ('a'..'f').each do |a|
|
37
|
+
%li= a
|
38
|
+
#combo.of_divs_with_underscore= @should_eval = "with this text"
|
39
|
+
= "foo".each_line do |line|
|
40
|
+
- nil
|
41
|
+
.footer
|
42
|
+
%strong.shout= "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"
|
@@ -0,0 +1,42 @@
|
|
1
|
+
!!!
|
2
|
+
%html{html_attrs}
|
3
|
+
%head
|
4
|
+
%title Hampton Catlin Is Totally Awesome
|
5
|
+
%meta{"http-equiv" => "Content-Type", :content => "text/html; charset=utf-8"}
|
6
|
+
%body
|
7
|
+
/ You're In my house now!
|
8
|
+
.header
|
9
|
+
Yes, ladies and gentileman. He is just that egotistical.
|
10
|
+
Fantastic! This should be multi-line output
|
11
|
+
The question is if this would translate! Ahah!
|
12
|
+
= 1 + 9 + 8 + 2 #numbers should work and this should be ignored
|
13
|
+
#body= " Quotes should be loved! Just like people!"
|
14
|
+
- 120.times do |number|
|
15
|
+
- number
|
16
|
+
Wow.|
|
17
|
+
%p
|
18
|
+
= "Holy cow " + |
|
19
|
+
"multiline " + |
|
20
|
+
"tags! " + |
|
21
|
+
"A pipe (|) even!" |
|
22
|
+
= [1, 2, 3].collect { |n| "PipesIgnored|" }.join
|
23
|
+
= [1, 2, 3].collect { |n| |
|
24
|
+
n.to_s |
|
25
|
+
}.join("|") |
|
26
|
+
%div.silent
|
27
|
+
- foo = String.new
|
28
|
+
- foo << "this"
|
29
|
+
- foo << " shouldn't"
|
30
|
+
- foo << " evaluate"
|
31
|
+
= foo + " but now it should!"
|
32
|
+
-# Woah crap a comment!
|
33
|
+
|
34
|
+
-# That was a line that shouldn't close everything.
|
35
|
+
%ul.really.cool
|
36
|
+
- ('a'..'f').each do |a|
|
37
|
+
%li= a
|
38
|
+
#combo.of_divs_with_underscore= @should_eval = "with this text"
|
39
|
+
= "foo".each_line do |line|
|
40
|
+
- nil
|
41
|
+
.footer
|
42
|
+
%strong.shout= "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"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
%div.tags
|
2
|
+
%foo 1
|
3
|
+
%FOO 2
|
4
|
+
%fooBAR 3
|
5
|
+
%fooBar 4
|
6
|
+
%foo_bar 5
|
7
|
+
%foo-bar 6
|
8
|
+
%foo:bar 7
|
9
|
+
%foo.bar 8
|
10
|
+
%fooBAr_baz:boom_bar 9
|
11
|
+
%foo13 10
|
12
|
+
%foo2u 11
|
13
|
+
%div.classes
|
14
|
+
%p.foo.bar#baz#boom
|
15
|
+
.fooBar a
|
16
|
+
.foo-bar b
|
17
|
+
.foo_bar c
|
18
|
+
.FOOBAR d
|
19
|
+
.foo16 e
|
20
|
+
.123 f
|
21
|
+
.foo2u g
|
@@ -0,0 +1,87 @@
|
|
1
|
+
#whitespace_test
|
2
|
+
= test_partial "text_area", :value => "Oneline"
|
3
|
+
= test_partial "text_area", :value => "Two\nlines"
|
4
|
+
~ test_partial "text_area", :value => "Oneline"
|
5
|
+
~ test_partial "text_area", :value => "Two\nlines"
|
6
|
+
#flattened~ test_partial "text_area", :value => "Two\nlines"
|
7
|
+
.hithere
|
8
|
+
~ "Foo bar"
|
9
|
+
~ "<pre>foo bar</pre>"
|
10
|
+
~ "<pre>foo\nbar</pre>"
|
11
|
+
%p~ "<pre>foo\nbar</pre>"
|
12
|
+
%p~ "foo\nbar"
|
13
|
+
.foo
|
14
|
+
~ 13
|
15
|
+
~ "<textarea>\na\n</textarea>".each_line do |l|
|
16
|
+
- haml_concat l.strip
|
17
|
+
#whitespace_test
|
18
|
+
= test_partial "text_area", :value => "Oneline"
|
19
|
+
= test_partial "text_area", :value => "Two\nlines"
|
20
|
+
= find_and_preserve test_partial("text_area", :value => "Oneline")
|
21
|
+
= find_and_preserve test_partial("text_area", :value => "Two\nlines")
|
22
|
+
#flattened= find_and_preserve test_partial("text_area", :value => "Two\nlines")
|
23
|
+
.hithere
|
24
|
+
= find_and_preserve("Foo bar")
|
25
|
+
= find_and_preserve("<pre>foo bar</pre>")
|
26
|
+
= find_and_preserve("<pre>foo\nbar</pre>")
|
27
|
+
%p= find_and_preserve("<pre>foo\nbar</pre>")
|
28
|
+
%p= find_and_preserve("foo\nbar")
|
29
|
+
%pre
|
30
|
+
:preserve
|
31
|
+
___
|
32
|
+
,o88888
|
33
|
+
,o8888888'
|
34
|
+
,:o:o:oooo. ,8O88Pd8888"
|
35
|
+
,.::.::o:ooooOoOoO. ,oO8O8Pd888'"
|
36
|
+
,.:.::o:ooOoOoOO8O8OOo.8OOPd8O8O"
|
37
|
+
, ..:.::o:ooOoOOOO8OOOOo.FdO8O8"
|
38
|
+
, ..:.::o:ooOoOO8O888O8O,COCOO"
|
39
|
+
, . ..:.::o:ooOoOOOO8OOOOCOCO"
|
40
|
+
. ..:.::o:ooOoOoOO8O8OCCCC"o
|
41
|
+
. ..:.::o:ooooOoCoCCC"o:o
|
42
|
+
. ..:.::o:o:,cooooCo"oo:o:
|
43
|
+
` . . ..:.:cocoooo"'o:o:::'
|
44
|
+
.` . ..::ccccoc"'o:o:o:::'
|
45
|
+
:.:. ,c:cccc"':.:.:.:.:.'
|
46
|
+
..:.:"'`::::c:"'..:.:.:.:.:.' http://www.chris.com/ASCII/
|
47
|
+
...:.'.:.::::"' . . . . .'
|
48
|
+
.. . ....:."' ` . . . ''
|
49
|
+
. . . ...."'
|
50
|
+
.. . ."' -hrr-
|
51
|
+
.
|
52
|
+
|
53
|
+
|
54
|
+
It's a planet!
|
55
|
+
%strong This shouldn't be bold!
|
56
|
+
%strong This should!
|
57
|
+
%textarea
|
58
|
+
:preserve
|
59
|
+
___ ___ ___ ___
|
60
|
+
/\__\ /\ \ /\__\ /\__\
|
61
|
+
/:/ / /::\ \ /::| | /:/ /
|
62
|
+
/:/__/ /:/\:\ \ /:|:| | /:/ /
|
63
|
+
/::\ \ ___ /::\~\:\ \ /:/|:|__|__ /:/ /
|
64
|
+
/:/\:\ /\__\ /:/\:\ \:\__\ /:/ |::::\__\ /:/__/
|
65
|
+
\/__\:\/:/ / \/__\:\/:/ / \/__/~~/:/ / \:\ \
|
66
|
+
\::/ / \::/ / /:/ / \:\ \
|
67
|
+
/:/ / /:/ / /:/ / \:\ \
|
68
|
+
/:/ / /:/ / /:/ / \:\__\
|
69
|
+
\/__/ \/__/ \/__/ \/__/
|
70
|
+
|
71
|
+
Many
|
72
|
+
thanks
|
73
|
+
to
|
74
|
+
http://www.network-science.de/ascii/
|
75
|
+
%strong indeed!
|
76
|
+
.foo
|
77
|
+
= find_and_preserve(13)
|
78
|
+
%pre
|
79
|
+
:preserve
|
80
|
+
__ ______ __ ______
|
81
|
+
.----.| |--.|__ |.----.| |--..--------.| __ |
|
82
|
+
| __|| ||__ || __|| < | || __ |
|
83
|
+
|____||__|__||______||____||__|__||__|__|__||______|
|
84
|
+
%pre
|
85
|
+
:preserve
|
86
|
+
foo
|
87
|
+
bar
|