summaryrefslogtreecommitdiffstats
path: root/emacs.d/nxhtml/tests/in/haml1.haml
blob: 85f2324ab413b0faf92d841c0a627c984a722c1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
!!! XML
!!!

%html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en", :lang => "en"}

%title
  = @title
  \= @title

%script{:type => "text/javascript",
        :src  => "javascripts/script_#{2 + 7}"}

%gee
  %whiz
    Wow this is cool!
%p
  <div id="blah">Blah!</div>
%one
  %two
    %three Hey there

%html(xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en")

%a(title=@title href=href) Stuff
%a{:title => @title, :href => href} Stuff

%script(type="text/javascript"
        src="javascripts/script_#{2 + 7}")

%html{html_attrs('fr-fr')}

%input{:selected => true}
%input(selected)
%input(selected=true)

%div#things
  %span#rice Chicken Fried
  %p.beans{ :food => 'true' } The magical fruit
  %h1.class.otherclass#id La La La

#content .articles
    .article.title Doogie Howser Comes Out
    .article.date 2006-11-05
    .article.entry
      Neil Patrick Harris would like to dispel any rumors that he is straight

%br/
%meta{'http-equiv' => 'Content-Type', :content => 'text/html'}/

%br
%meta{'http-equiv' => 'Content-Type', :content => 'text/html'}

%blockquote<
  %div
    Foo!

%img
%img>
%img

%img
%pre><
  foo
  bar
%img

%peanutbutterjelly
  / This is the peanutbutterjelly element
  I like sandwiches!

/
  %p This doesn't render...
  %div
    %h1 Because it's commented out!

/[if IE]
  %a{ :href => 'http://www.mozilla.com/en-US/firefox/' }
    %h1 Get Firefox

%p foo
-# This is a comment
%p bar

- foo = "hello"
- foo << " there"
- foo << " you!"
%p= foo

- (42...47).each do |i|
  %p= i
%p See, I can count!

%p
  - case 2
  - when 1
    = "1!"
  - when 2
    = "2?"
  - when 3
    = "3."

%p This is #{h quality} cake!
%p= "This is the #{h quality} cake!"

%p
  Look at \\#{h word} lack of backslash: \#{foo}
  And yon presence thereof: \{foo}

:javascript
  $(document).ready(function() {
    alert(#{@message.to_json});
  });

&= "I like cheese & crackers"

= "I feel <strong>!"
!= "I feel <strong>!"
compiles to
I feel &lt;strong&gt;!
I feel <strong>!

%p
  :markdown
    Textile
    =======

    Hello, *World*

- flavor = "raspberry"
#content
  :textile
    I *really* prefer _#{h flavor}_ jam.