haml 4.0.7 → 5.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +18 -0
  3. data/.gitmodules +3 -0
  4. data/.travis.yml +54 -0
  5. data/.yardopts +1 -1
  6. data/CHANGELOG.md +96 -4
  7. data/FAQ.md +4 -14
  8. data/Gemfile +19 -0
  9. data/MIT-LICENSE +1 -1
  10. data/README.md +80 -42
  11. data/REFERENCE.md +116 -64
  12. data/Rakefile +46 -54
  13. data/TODO +24 -0
  14. data/benchmark.rb +66 -0
  15. data/haml.gemspec +38 -0
  16. data/lib/haml/.gitattributes +1 -0
  17. data/lib/haml/attribute_builder.rb +163 -0
  18. data/lib/haml/attribute_compiler.rb +223 -0
  19. data/lib/haml/attribute_parser.rb +148 -0
  20. data/lib/haml/buffer.rb +22 -132
  21. data/lib/haml/compiler.rb +89 -298
  22. data/lib/haml/engine.rb +25 -41
  23. data/lib/haml/error.rb +3 -0
  24. data/lib/haml/escapable.rb +49 -0
  25. data/lib/haml/exec.rb +38 -19
  26. data/lib/haml/filters.rb +18 -24
  27. data/lib/haml/generator.rb +41 -0
  28. data/lib/haml/helpers/action_view_extensions.rb +3 -2
  29. data/lib/haml/helpers/action_view_mods.rb +42 -60
  30. data/lib/haml/helpers/action_view_xss_mods.rb +1 -0
  31. data/lib/haml/helpers/safe_erubi_template.rb +19 -0
  32. data/lib/haml/helpers/safe_erubis_template.rb +4 -1
  33. data/lib/haml/helpers/xss_mods.rb +18 -12
  34. data/lib/haml/helpers.rb +132 -89
  35. data/lib/haml/options.rb +41 -47
  36. data/lib/haml/parser.rb +278 -216
  37. data/lib/haml/{template/plugin.rb → plugin.rb} +8 -15
  38. data/lib/haml/railtie.rb +38 -12
  39. data/lib/haml/sass_rails_filter.rb +17 -4
  40. data/lib/haml/template/options.rb +12 -2
  41. data/lib/haml/template.rb +12 -6
  42. data/lib/haml/temple_engine.rb +121 -0
  43. data/lib/haml/temple_line_counter.rb +29 -0
  44. data/lib/haml/util.rb +80 -199
  45. data/lib/haml/version.rb +2 -1
  46. data/lib/haml.rb +1 -0
  47. data/yard/default/.gitignore +1 -0
  48. data/yard/default/fulldoc/html/css/common.sass +15 -0
  49. data/yard/default/layout/html/footer.erb +12 -0
  50. metadata +50 -111
  51. data/test/engine_test.rb +0 -2013
  52. data/test/erb/_av_partial_1.erb +0 -12
  53. data/test/erb/_av_partial_2.erb +0 -8
  54. data/test/erb/action_view.erb +0 -62
  55. data/test/erb/standard.erb +0 -55
  56. data/test/filters_test.rb +0 -254
  57. data/test/gemfiles/Gemfile.rails-3.0.x +0 -5
  58. data/test/gemfiles/Gemfile.rails-3.1.x +0 -6
  59. data/test/gemfiles/Gemfile.rails-3.2.x +0 -5
  60. data/test/gemfiles/Gemfile.rails-4.0.x +0 -5
  61. data/test/haml-spec/LICENSE +0 -14
  62. data/test/haml-spec/README.md +0 -106
  63. data/test/haml-spec/lua_haml_spec.lua +0 -38
  64. data/test/haml-spec/perl_haml_test.pl +0 -81
  65. data/test/haml-spec/ruby_haml_test.rb +0 -23
  66. data/test/haml-spec/tests.json +0 -660
  67. data/test/helper_test.rb +0 -583
  68. data/test/markaby/standard.mab +0 -52
  69. data/test/mocks/article.rb +0 -6
  70. data/test/parser_test.rb +0 -105
  71. data/test/results/content_for_layout.xhtml +0 -12
  72. data/test/results/eval_suppressed.xhtml +0 -9
  73. data/test/results/helpers.xhtml +0 -70
  74. data/test/results/helpful.xhtml +0 -10
  75. data/test/results/just_stuff.xhtml +0 -70
  76. data/test/results/list.xhtml +0 -12
  77. data/test/results/nuke_inner_whitespace.xhtml +0 -40
  78. data/test/results/nuke_outer_whitespace.xhtml +0 -148
  79. data/test/results/original_engine.xhtml +0 -20
  80. data/test/results/partial_layout.xhtml +0 -5
  81. data/test/results/partial_layout_erb.xhtml +0 -5
  82. data/test/results/partials.xhtml +0 -21
  83. data/test/results/render_layout.xhtml +0 -3
  84. data/test/results/silent_script.xhtml +0 -74
  85. data/test/results/standard.xhtml +0 -162
  86. data/test/results/tag_parsing.xhtml +0 -23
  87. data/test/results/very_basic.xhtml +0 -5
  88. data/test/results/whitespace_handling.xhtml +0 -90
  89. data/test/template_test.rb +0 -354
  90. data/test/templates/_av_partial_1.haml +0 -9
  91. data/test/templates/_av_partial_1_ugly.haml +0 -9
  92. data/test/templates/_av_partial_2.haml +0 -5
  93. data/test/templates/_av_partial_2_ugly.haml +0 -5
  94. data/test/templates/_layout.erb +0 -3
  95. data/test/templates/_layout_for_partial.haml +0 -3
  96. data/test/templates/_partial.haml +0 -8
  97. data/test/templates/_text_area.haml +0 -3
  98. data/test/templates/_text_area_helper.html.haml +0 -4
  99. data/test/templates/action_view.haml +0 -47
  100. data/test/templates/action_view_ugly.haml +0 -47
  101. data/test/templates/breakage.haml +0 -8
  102. data/test/templates/content_for_layout.haml +0 -8
  103. data/test/templates/eval_suppressed.haml +0 -11
  104. data/test/templates/helpers.haml +0 -55
  105. data/test/templates/helpful.haml +0 -11
  106. data/test/templates/just_stuff.haml +0 -85
  107. data/test/templates/list.haml +0 -12
  108. data/test/templates/nuke_inner_whitespace.haml +0 -32
  109. data/test/templates/nuke_outer_whitespace.haml +0 -144
  110. data/test/templates/original_engine.haml +0 -17
  111. data/test/templates/partial_layout.haml +0 -3
  112. data/test/templates/partial_layout_erb.erb +0 -4
  113. data/test/templates/partialize.haml +0 -1
  114. data/test/templates/partials.haml +0 -12
  115. data/test/templates/render_layout.haml +0 -2
  116. data/test/templates/silent_script.haml +0 -45
  117. data/test/templates/standard.haml +0 -43
  118. data/test/templates/standard_ugly.haml +0 -43
  119. data/test/templates/tag_parsing.haml +0 -21
  120. data/test/templates/very_basic.haml +0 -4
  121. data/test/templates/whitespace_handling.haml +0 -87
  122. data/test/test_helper.rb +0 -81
  123. data/test/util_test.rb +0 -63
@@ -1,4 +0,0 @@
1
- - defined?(text_area_helper) and nil # silence a warning
2
- .foo
3
- .bar
4
- = text_area :post, :body
@@ -1,47 +0,0 @@
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
- %h1
8
- This is very much like the standard template,
9
- except that it has some ActionView-specific stuff.
10
- It's only used for benchmarking.
11
- .crazy_partials= render :partial => 'templates/av_partial_1'
12
- / You're In my house now!
13
- .header
14
- Yes, ladies and gentileman. He is just that egotistical.
15
- Fantastic! This should be multi-line output
16
- The question is if this would translate! Ahah!
17
- = 1 + 9 + 8 + 2 #numbers should work and this should be ignored
18
- #body= " Quotes should be loved! Just like people!"
19
- - 120.times do |number|
20
- - number
21
- Wow.|
22
- %p
23
- = "Holy cow " + |
24
- "multiline " + |
25
- "tags! " + |
26
- "A pipe (|) even!" |
27
- = [1, 2, 3].collect { |n| "PipesIgnored|" }
28
- = [1, 2, 3].collect { |n| |
29
- n.to_s |
30
- }.join("|") |
31
- %div.silent
32
- - foo = String.new
33
- - foo << "this"
34
- - foo << " shouldn't"
35
- - foo << " evaluate"
36
- = foo + " but now it should!"
37
- -# Woah crap a comment!
38
-
39
- -# That was a line that shouldn't close everything.
40
- %ul.really.cool
41
- - ('a'..'f').each do |a|
42
- %li= a
43
- #combo.of_divs_with_underscore= @should_eval = "with this text"
44
- = [ 104, 101, 108, 108, 111 ].map do |byte|
45
- - byte.chr
46
- .footer
47
- %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"
@@ -1,47 +0,0 @@
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
- %h1
8
- This is very much like the standard template,
9
- except that it has some ActionView-specific stuff.
10
- It's only used for benchmarking.
11
- .crazy_partials= render :partial => 'templates/av_partial_1_ugly'
12
- / You're In my house now!
13
- .header
14
- Yes, ladies and gentileman. He is just that egotistical.
15
- Fantastic! This should be multi-line output
16
- The question is if this would translate! Ahah!
17
- = 1 + 9 + 8 + 2 #numbers should work and this should be ignored
18
- #body= " Quotes should be loved! Just like people!"
19
- - 120.times do |number|
20
- - number
21
- Wow.|
22
- %p
23
- = "Holy cow " + |
24
- "multiline " + |
25
- "tags! " + |
26
- "A pipe (|) even!" |
27
- = [1, 2, 3].collect { |n| "PipesIgnored|" }
28
- = [1, 2, 3].collect { |n| |
29
- n.to_s |
30
- }.join("|") |
31
- %div.silent
32
- - foo = String.new
33
- - foo << "this"
34
- - foo << " shouldn't"
35
- - foo << " evaluate"
36
- = foo + " but now it should!"
37
- -# Woah crap a comment!
38
-
39
- -# That was a line that shouldn't close everything.
40
- %ul.really.cool
41
- - ('a'..'f').each do |a|
42
- %li= a
43
- #combo.of_divs_with_underscore= @should_eval = "with this text"
44
- = [ 104, 101, 108, 108, 111 ].map do |byte|
45
- - byte.chr
46
- .footer
47
- %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"
@@ -1,8 +0,0 @@
1
- %p
2
- %h1 Hello!
3
- = "lots of lines"
4
- - raise "Oh no!"
5
- %p
6
- this is after the exception
7
- %strong yes it is!
8
- ho ho ho.
@@ -1,8 +0,0 @@
1
- !!!
2
- %html
3
- %head
4
- %body
5
- #yieldy
6
- = yield :layout
7
- #nosym
8
- = yield
@@ -1,11 +0,0 @@
1
- = "not me!"
2
- = "nor me!"
3
- - haml_concat "not even me!"
4
- %p= "NO!"
5
- %p~ "UH-UH!"
6
- %h1 Me!
7
- #foo
8
- %p#bar All
9
- %br/
10
- %p.baz This
11
- Should render
@@ -1,55 +0,0 @@
1
- = h("&&&&&&&&&&&") # This is an ActionView Helper... should load
2
- - foo = capture do # This ActionView Helper is designed for ERB, but should work with haml
3
- %div
4
- %p.title Title
5
- %p.text
6
- Woah this is really crazy
7
- I mean wow,
8
- man.
9
- - 3.times do
10
- = foo
11
- %p foo
12
- - tab_up
13
- %p reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeally loooooooooooooooooong
14
- - tab_down
15
- .woah
16
- #funky
17
- = capture_haml do
18
- %div
19
- %h1 Big!
20
- %p Small
21
- / Invisible
22
- = capture do
23
- .dilly
24
- %p foo
25
- %h1 bar
26
- = surround '(', ')' do
27
- %strong parentheses!
28
- = precede '*' do
29
- %span.small Not really
30
- click
31
- = succeed '.' do
32
- %a{:href=>"thing"} here
33
- %p baz
34
- - haml_buffer.tabulation = 10
35
- %p boom
36
- - concat "foo\n"
37
- - haml_buffer.tabulation = 0
38
- = list_of({:google => 'http://www.google.com'}) do |name, link|
39
- %a{ :href => link }= name
40
- %p
41
- - haml_concat "foo"
42
- %div
43
- - haml_concat "bar"
44
- - haml_concat "boom"
45
- baz
46
- - haml_concat "boom, again"
47
- - haml_tag :table do
48
- - haml_tag :tr do
49
- - haml_tag :td, {:class => 'cell'} do
50
- - haml_tag :strong, "strong!"
51
- - haml_concat "data"
52
- - haml_tag :td do
53
- - haml_concat "more_data"
54
- - haml_tag :hr
55
- - haml_tag :div, ''
@@ -1,11 +0,0 @@
1
- %div[@article]
2
- %h1= @article.title
3
- %div= @article.body
4
- #id[@article] id
5
- .class[@article] class
6
- #id.class[@article] id class
7
- %div{:class => "article full"}[@article]= "boo"
8
- %div{'class' => "article full"}[@article]= "moo"
9
- %div.articleFull[@article]= "foo"
10
- %span[@not_a_real_variable_and_will_be_nil]
11
- Boo
@@ -1,85 +0,0 @@
1
- !!! XML
2
- !!! XML ISO-8859-1
3
- !!! XML UtF-8 Foo bar
4
- !!!
5
- !!! 1.1
6
- !!! 1.1 Strict
7
- !!! Strict foo bar
8
- !!! FRAMESET
9
- %strong{:apos => "Foo's bar!"} Boo!
10
- == Embedded? false!
11
- == Embedded? #{true}!
12
- - embedded = true
13
- == Embedded? #{embedded}!
14
- == Embedded? #{"twice! #{true}"}!
15
- == Embedded? #{"one"} af"t"er #{"another"}!
16
- %p== Embedded? false!
17
- %p== Embedded? #{true}!
18
- - embedded = true
19
- %p== Embedded? #{embedded}!
20
- %p== Embedded? #{"twice! #{true}"}!
21
- %p== Embedded? #{"one"} af"t"er #{"another"}!
22
- = "stuff followed by whitespace"
23
-
24
- - if true
25
-
26
- %strong block with whitespace
27
- %p
28
- \Escape
29
- \- character
30
- \%p foo
31
- \yee\ha
32
- / Short comment
33
- /
34
- This is a block comment
35
- cool, huh?
36
- %strong there can even be sub-tags!
37
- = "Or script!"
38
- -# Haml comment
39
- -#
40
- Nested Haml comment
41
- - raise 'dead'
42
- %p{ :class => "" } class attribute should appear!
43
- %p{ :gorbachev => nil } this attribute shouldn't appear
44
- /[if lte IE6] conditional comment!
45
- /[if gte IE7]
46
- %p Block conditional comment
47
- %div
48
- %h1 Cool, eh?
49
- /[if gte IE5.2]
50
- Woah a period.
51
- = "test" |
52
- "test" |
53
- -# Hard tabs shouldn't throw errors.
54
-
55
- - case :foo
56
- - when :bar
57
- %br Blah
58
- - when :foo
59
- %br
60
- - case :foo
61
- - when :bar
62
- %meta{ :foo => 'blah'}
63
- - when :foo
64
- %meta{ :foo => 'bar'}
65
- %img
66
- %hr
67
- %link
68
- %script Inline content
69
- %br
70
- Nested content
71
- %p.foo{:class => true ? 'bar' : 'baz'}[@article] Blah
72
- %p.foo{:class => false ? 'bar' : ''}[@article] Blah
73
- %p.foo{:class => %w[bar baz]}[@article] Blah
74
- %p.qux{:class => 'quux'}[@article] Blump
75
- %p#foo{:id => %w[bar baz]}[@article] Whee
76
- == #{"Woah inner quotes"}
77
- %p.dynamic_quote{:quotes => "single '", :dyn => 1 + 2}
78
- %p.dynamic_self_closing{:dyn => 1 + 2}/
79
- %body
80
- :plain
81
- hello
82
- %div
83
-
84
- %img
85
-
@@ -1,12 +0,0 @@
1
- !Not a Doctype!
2
- %ul
3
- %li a
4
- %li b
5
- %li c
6
- %li d
7
- %li e
8
- %li f
9
- %li g
10
- %li h
11
- %li i
12
-
@@ -1,32 +0,0 @@
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
@@ -1,144 +0,0 @@
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}>/
@@ -1,17 +0,0 @@
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?
@@ -1,3 +0,0 @@
1
- %h1 Partial layout used with for block:
2
- = render :layout => 'layout_for_partial' do
3
- %p Some content within a layout
@@ -1,4 +0,0 @@
1
- <h1>Partial layout used with for block:</h1>
2
- <%= render :layout => 'layout_for_partial' do -%>
3
- Some content within a layout
4
- <% end %>
@@ -1 +0,0 @@
1
- = render :file => "#{name}.haml"
@@ -1,12 +0,0 @@
1
- - @foo = 'value one'
2
- %p
3
- @foo =
4
- = @foo
5
- - @foo = 'value two'
6
- %p
7
- @foo =
8
- = @foo
9
- = test_partial "partial"
10
- %p
11
- @foo =
12
- = @foo
@@ -1,2 +0,0 @@
1
- = render :layout => 'layout' do
2
- During
@@ -1,45 +0,0 @@
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
- - raise "foo"
12
- - rescue RuntimeError => 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
- - unless true
27
- Testing else indent
28
- - case 1
29
- - when 2
30
- Also testing else indent
31
- - else
32
- = "This can't happen!"
33
- - 13 |
34
- .foo
35
- %strong foobar
36
- - 5.times |
37
- do |
38
- |a| |
39
- %strong= a
40
- .test
41
- - "foo |
42
- bar |
43
- baz" |
44
-
45
- %p boom
@@ -1,43 +0,0 @@
1
- !!!
2
- %html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en-US", "lang" => "en-US"}
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{:code => 1 + 2}
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
- - bar = 17
27
- %div.silent{:foo => bar}
28
- - foo = String.new
29
- - foo << "this"
30
- - foo << " shouldn't"
31
- - foo << " evaluate"
32
- = foo + " but now it should!"
33
- -# Woah crap a comment!
34
-
35
- -# That was a line that shouldn't close everything.
36
- %ul.really.cool
37
- - ('a'..'f').each do |a|
38
- %li= a
39
- #combo.of_divs_with_underscore= @should_eval = "with this text"
40
- = "foo".each_line do |line|
41
- - nil
42
- .footer
43
- %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"
@@ -1,43 +0,0 @@
1
- !!!
2
- %html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en-US", "lang" => "en-US"}
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{:code => 1 + 2}
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
- - bar = 17
27
- %div.silent{:foo => bar}
28
- - foo = String.new
29
- - foo << "this"
30
- - foo << " shouldn't"
31
- - foo << " evaluate"
32
- = foo + " but now it should!"
33
- -# Woah crap a comment!
34
-
35
- -# That was a line that shouldn't close everything.
36
- %ul.really.cool
37
- - ('a'..'f').each do |a|
38
- %li= a
39
- #combo.of_divs_with_underscore= @should_eval = "with this text"
40
- = "foo".each_line do |line|
41
- - nil
42
- .footer
43
- %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"
@@ -1,21 +0,0 @@
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
@@ -1,4 +0,0 @@
1
- !!!
2
- %html
3
- %head
4
- %body