1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00
haml--haml/test/templates/just_stuff.haml
2015-10-24 20:32:24 +09:00

86 lines
1.7 KiB
Text

!!! XML
!!! XML ISO-8859-1
!!! XML UtF-8 Foo bar
!!!
!!! 1.1
!!! 1.1 Strict
!!! Strict foo bar
!!! FRAMESET
%strong{:apos => "Foo's bar!"} Boo!
== Embedded? false!
== Embedded? #{true}!
- embedded = true
== Embedded? #{embedded}!
== Embedded? #{"twice! #{true}"}!
== Embedded? #{"one"} af"t"er #{"another"}!
%p== Embedded? false!
%p== Embedded? #{true}!
- embedded = true
%p== Embedded? #{embedded}!
%p== Embedded? #{"twice! #{true}"}!
%p== Embedded? #{"one"} af"t"er #{"another"}!
= "stuff followed by whitespace"
- if true
%strong block with whitespace
%p
\Escape
\- character
\%p foo
\yee\ha
\ don't lstrip me
/ Short comment
/
This is a block comment
cool, huh?
%strong there can even be sub-tags!
= "Or script!"
-# Haml comment
-#
Nested Haml comment
- raise 'dead'
%p{ :class => "" } class attribute should appear!
%p{ :gorbachev => nil } this attribute shouldn't appear
/[if lte IE6] conditional comment!
/[if gte IE7]
%p Block conditional comment
%div
%h1 Cool, eh?
/[if gte IE5.2]
Woah a period.
= "test" |
"test" |
-# Hard tabs shouldn't throw errors.
- case :foo
- when :bar
%br Blah
- when :foo
%br
- case :foo
- when :bar
%meta{ :foo => 'blah'}
- when :foo
%meta{ :foo => 'bar'}
%img
%hr
%link
%script Inline content
%br
Nested content
%p.foo{:class => true ? 'bar' : 'baz'}[@article] Blah
%p.foo{:class => false ? 'bar' : ''}[@article] Blah
%p.foo{:class => %w[bar baz]}[@article] Blah
%p.qux{:class => 'quux'}[@article] Blump
%p#foo{:id => %w[bar baz]}[@article] Whee
== #{"Woah inner quotes"}
%p.dynamic_quote{:quotes => "single '", :dyn => 1 + 2}
%p.dynamic_self_closing{:dyn => 1 + 2}/
%body
:plain
hello
%div
%img