SLIM mode

x
 
1
body
2
  table
3
    - for user in users
4
      td id="user_#{user.id}" class=user.role
5
        a href=user_action(user, :edit) Edit #{user.name}
6
        a href=(path_to_user user) = user.name
7
body
8
  h1(id="logo") = page_logo
9
  h2[id="tagline" class="small tagline"] = page_tagline
10
11
h2[id="tagline"
12
   class="small tagline"] = page_tagline
13
14
h1 id = "logo" = page_logo
15
h2 [ id = "tagline" ] = page_tagline
16
17
/ comment
18
  second line
19
/! html comment
20
   second line
21
<!-- html comment -->
22
<a href="#{'hello' if set}">link</a>
23
a.slim href="work" disabled=false running==:atom Text <b>bold</b>
24
.clazz data-id="test" == 'hello' unless quark
25
 | Text mode #{12}
26
   Second line
27
= x ||= :ruby_atom
28
#menu.left
29
  - @env.each do |x|
30
    li: a = x
31
*@dyntag attr="val"
32
.first *{:class => [:second, :third]} Text
33
.second class=["text","more"]
34
.third class=:text,:symbol
35
36
  

MIME types defined: application/x-slim.

Parsing/Highlighting Tests: normal, verbose.