]> git.rkrishnan.org Git - .emacs.d.git/blob - emacs/nxhtml/tests/in/haml1.haml
85f2324ab413b0faf92d841c0a627c984a722c1b
[.emacs.d.git] / emacs / nxhtml / tests / in / haml1.haml
1 !!! XML\r
2 !!!\r
3 \r
4 %html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en", :lang => "en"}\r
5 \r
6 %title\r
7   = @title\r
8   \= @title\r
9 \r
10 %script{:type => "text/javascript",\r
11         :src  => "javascripts/script_#{2 + 7}"}\r
12 \r
13 %gee\r
14   %whiz\r
15     Wow this is cool!\r
16 %p\r
17   <div id="blah">Blah!</div>\r
18 %one\r
19   %two\r
20     %three Hey there\r
21 \r
22 %html(xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en")\r
23 \r
24 %a(title=@title href=href) Stuff\r
25 %a{:title => @title, :href => href} Stuff\r
26 \r
27 %script(type="text/javascript"\r
28         src="javascripts/script_#{2 + 7}")\r
29 \r
30 %html{html_attrs('fr-fr')}\r
31 \r
32 %input{:selected => true}\r
33 %input(selected)\r
34 %input(selected=true)\r
35 \r
36 %div#things\r
37   %span#rice Chicken Fried\r
38   %p.beans{ :food => 'true' } The magical fruit\r
39   %h1.class.otherclass#id La La La\r
40 \r
41 #content .articles\r
42     .article.title Doogie Howser Comes Out\r
43     .article.date 2006-11-05\r
44     .article.entry\r
45       Neil Patrick Harris would like to dispel any rumors that he is straight\r
46 \r
47 %br/\r
48 %meta{'http-equiv' => 'Content-Type', :content => 'text/html'}/\r
49 \r
50 %br\r
51 %meta{'http-equiv' => 'Content-Type', :content => 'text/html'}\r
52 \r
53 %blockquote<\r
54   %div\r
55     Foo!\r
56 \r
57 %img\r
58 %img>\r
59 %img\r
60 \r
61 %img\r
62 %pre><\r
63   foo\r
64   bar\r
65 %img\r
66 \r
67 %peanutbutterjelly\r
68   / This is the peanutbutterjelly element\r
69   I like sandwiches!\r
70 \r
71 /\r
72   %p This doesn't render...\r
73   %div\r
74     %h1 Because it's commented out!\r
75 \r
76 /[if IE]\r
77   %a{ :href => 'http://www.mozilla.com/en-US/firefox/' }\r
78     %h1 Get Firefox\r
79 \r
80 %p foo\r
81 -# This is a comment\r
82 %p bar\r
83 \r
84 - foo = "hello"\r
85 - foo << " there"\r
86 - foo << " you!"\r
87 %p= foo\r
88 \r
89 - (42...47).each do |i|\r
90   %p= i\r
91 %p See, I can count!\r
92 \r
93 %p\r
94   - case 2\r
95   - when 1\r
96     = "1!"\r
97   - when 2\r
98     = "2?"\r
99   - when 3\r
100     = "3."\r
101 \r
102 %p This is #{h quality} cake!\r
103 %p= "This is the #{h quality} cake!"\r
104 \r
105 %p\r
106   Look at \\#{h word} lack of backslash: \#{foo}\r
107   And yon presence thereof: \{foo}\r
108 \r
109 :javascript\r
110   $(document).ready(function() {\r
111     alert(#{@message.to_json});\r
112   });\r
113 \r
114 &= "I like cheese & crackers"\r
115 \r
116 = "I feel <strong>!"\r
117 != "I feel <strong>!"\r
118 compiles to\r
119 I feel &lt;strong&gt;!\r
120 I feel <strong>!\r
121 \r
122 %p\r
123   :markdown\r
124     Textile\r
125     =======\r
126 \r
127     Hello, *World*\r
128 \r
129 - flavor = "raspberry"\r
130 #content\r
131   :textile\r
132     I *really* prefer _#{h flavor}_ jam.\r