| 1 |
/ from test/templates |
| 2 |
/ in https://github.com/haml/haml/archive/master.zip |
| 3 |
!!! XML |
| 4 |
!!! XML ISO-8859-1 |
| 5 |
!!! XML UtF-8 Foo bar |
| 6 |
!!! |
| 7 |
!!! 1.1 |
| 8 |
!!! 1.1 Strict |
| 9 |
!!! Strict foo bar |
| 10 |
!!! FRAMESET |
| 11 |
%strong{:apos => "Foo's bar!"} Boo! |
| 12 |
== Embedded? false! |
| 13 |
== Embedded? #{true}! |
| 14 |
- embedded = true |
| 15 |
== Embedded? #{embedded}! |
| 16 |
== Embedded? #{"twice! #{true}"}! |
| 17 |
== Embedded? #{"one"} af"t"er #{"another"}! |
| 18 |
%p== Embedded? false! |
| 19 |
%p== Embedded? #{true}! |
| 20 |
- embedded = true |
| 21 |
%p== Embedded? #{embedded}! |
| 22 |
%p== Embedded? #{"twice! #{true}"}! |
| 23 |
%p== Embedded? #{"one"} af"t"er #{"another"}! |
| 24 |
= "stuff followed by whitespace" |
| 25 |
|
| 26 |
- if true |
| 27 |
|
| 28 |
%strong block with whitespace |
| 29 |
%p |
| 30 |
\Escape |
| 31 |
\- character |
| 32 |
\%p foo |
| 33 |
\yee\ha |
| 34 |
/ Short comment |
| 35 |
/ |
| 36 |
This is a block comment |
| 37 |
cool, huh? |
| 38 |
%strong there can even be sub-tags! |
| 39 |
= "Or script!" |
| 40 |
-# Haml comment |
| 41 |
-# |
| 42 |
Nested Haml comment |
| 43 |
- raise 'dead' |
| 44 |
%p{ :class => "" } class attribute should appear! |
| 45 |
%p{ :gorbachev => nil } this attribute shouldn't appear |
| 46 |
/[if lte IE6] conditional comment! |
| 47 |
/[if gte IE7] |
| 48 |
%p Block conditional comment |
| 49 |
%div |
| 50 |
%h1 Cool, eh? |
| 51 |
/[if gte IE5.2] |
| 52 |
Woah a period. |
| 53 |
= "test" | |
| 54 |
"test" | |
| 55 |
-# Hard tabs shouldn't throw errors. |
| 56 |
|
| 57 |
- case :foo |
| 58 |
- when :bar |
| 59 |
%br Blah |
| 60 |
- when :foo |
| 61 |
%br |
| 62 |
- case :foo |
| 63 |
- when :bar |
| 64 |
%meta{ :foo => 'blah'} |
| 65 |
- when :foo |
| 66 |
%meta{ :foo => 'bar'} |
| 67 |
%img |
| 68 |
%hr |
| 69 |
%link |
| 70 |
%script Inline content |
| 71 |
%br |
| 72 |
Nested content |
| 73 |
%p.foo{:class => true ? 'bar' : 'baz'}[@article] Blah |
| 74 |
%p.foo{:class => false ? 'bar' : ''}[@article] Blah |
| 75 |
%p.foo{:class => %w[bar baz]}[@article] Blah |
| 76 |
%p.qux{:class => 'quux'}[@article] Blump |
| 77 |
%p#foo{:id => %w[bar baz]}[@article] Whee |
| 78 |
== #{"Woah inner quotes"} |
| 79 |
%p.dynamic_quote{:quotes => "single '", :dyn => 1 + 2} |
| 80 |
%p.dynamic_self_closing{:dyn => 1 + 2}/ |
| 81 |
%body |
| 82 |
:plain |
| 83 |
hello |
| 84 |
%div |
| 85 |
|
| 86 |
%img |
| 87 |
|