2006-11-08 01:54:26 +00:00
|
|
|
!!! XML
|
|
|
|
!!! XML ISO-8859-1
|
|
|
|
!!! XML UtF-8 Foo bar
|
2006-10-27 20:36:34 +00:00
|
|
|
!!!
|
|
|
|
!!! 1.1
|
|
|
|
!!! 1.1 Strict
|
|
|
|
!!! Strict foo bar
|
|
|
|
!!! FRAMESET
|
2006-10-30 06:10:26 +00:00
|
|
|
%strong{:apos => "Foo's bar!"} Boo!
|
2007-02-10 17:41:47 +00:00
|
|
|
== Embedded? false!
|
|
|
|
== Embedded? #{true}!
|
|
|
|
- embedded = true
|
|
|
|
== Embedded? #{embedded}!
|
2007-07-29 19:44:17 +00:00
|
|
|
== Embedded? #{"twice! #{true}"}!
|
2007-11-26 01:36:57 +00:00
|
|
|
== 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"}!
|
2006-12-26 16:57:10 +00:00
|
|
|
= "stuff followed by whitespace"
|
|
|
|
|
2007-01-03 07:27:11 +00:00
|
|
|
- if true
|
|
|
|
|
|
|
|
%strong block with whitespace
|
2006-11-17 01:12:50 +00:00
|
|
|
%p
|
|
|
|
\Escape
|
|
|
|
\- character
|
|
|
|
\%p foo
|
|
|
|
\yee\ha
|
2006-10-22 21:42:45 +00:00
|
|
|
/ Short comment
|
|
|
|
/
|
|
|
|
This is a block comment
|
|
|
|
cool, huh?
|
|
|
|
%strong there can even be sub-tags!
|
|
|
|
= "Or script!"
|
2007-07-03 06:49:07 +00:00
|
|
|
-# Haml comment
|
|
|
|
-#
|
|
|
|
Nested Haml comment
|
|
|
|
- raise 'dead'
|
2007-07-24 09:20:22 +00:00
|
|
|
%p{ :class => "" } class attribute should appear!
|
|
|
|
%p{ :gorbachev => nil } this attribute shouldn't appear
|
2006-10-22 21:42:45 +00:00
|
|
|
/[if lte IE6] conditional comment!
|
|
|
|
/[if gte IE7]
|
|
|
|
%p Block conditional comment
|
|
|
|
%div
|
|
|
|
%h1 Cool, eh?
|
2006-11-26 23:42:44 +00:00
|
|
|
/[if gte IE5.2]
|
|
|
|
Woah a period.
|
2007-03-04 20:16:54 +00:00
|
|
|
= "test" |
|
2007-03-26 06:03:29 +00:00
|
|
|
"test" |
|
2007-03-30 06:49:03 +00:00
|
|
|
-# Hard tabs shouldn't throw errors.
|
|
|
|
|
2007-03-30 01:39:13 +00:00
|
|
|
- case :foo
|
|
|
|
- when :bar
|
|
|
|
%br Blah
|
|
|
|
- when :foo
|
|
|
|
%br
|
|
|
|
- case :foo
|
|
|
|
- when :bar
|
|
|
|
%meta{ :foo => 'blah'}
|
|
|
|
- when :foo
|
|
|
|
%meta{ :foo => 'bar'}
|
2007-03-26 06:03:29 +00:00
|
|
|
%img
|
|
|
|
%hr
|
|
|
|
%link
|
|
|
|
%script Inline content
|
|
|
|
%br
|
|
|
|
Nested content
|
2007-06-06 09:03:21 +00:00
|
|
|
%p.foo{:class => true ? 'bar' : 'baz'}[@article] Blah
|
|
|
|
%p.foo{:class => false ? 'bar' : ''}[@article] Blah
|
|
|
|
%p.qux{:class => 'quux'}[@article] Blump
|
2007-06-22 19:45:03 +00:00
|
|
|
== #{"Woah inner quotes"}
|
2007-06-22 20:45:21 +00:00
|
|
|
%p.dynamic_quote{:quotes => "single '", :dyn => 1 + 2}
|
2008-04-18 12:54:15 -07:00
|
|
|
%p.dynamic_self_closing{:dyn => 1 + 2}/
|