~didrocks/+junk/face-detection-15.04

« back to all changes in this revision

Viewing changes to facedetection/www/bower_components/prism/tests/languages/haml/tag_feature.test

  • Committer: Didier Roche
  • Date: 2016-05-10 23:09:11 UTC
  • Revision ID: didier.roche@canonical.com-20160510230911-c7xr490zrj3yrzxd
New version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%one
 
2
        %two
 
3
 
 
4
%div#things
 
5
%div.articles
 
6
%div.article.title
 
7
 
 
8
%script{:type => "text/javascript",
 
9
        :src  => "javascripts/script_#{42}"}
 
10
 
 
11
%div{:id => [@item.type, @item.number]}
 
12
 
 
13
%a(title=@title href=href)
 
14
%input(selected)
 
15
 
 
16
%html{html_attrs('fr-fr')}
 
17
 
 
18
%div[@user, :greeting]
 
19
        %bar[290]/
 
20
 
 
21
%div#Article.article.entry{:id => @article.number}
 
22
 
 
23
#collection
 
24
        .item
 
25
 
 
26
%br/
 
27
%blockquote<
 
28
%img>
 
29
 
 
30
----------------------------------------------------
 
31
 
 
32
[
 
33
        ["tag", ["%one"]],
 
34
        ["tag", ["%two"]],
 
35
 
 
36
        ["tag", ["%div#things"]],
 
37
        ["tag", ["%div.articles"]],
 
38
        ["tag", ["%div.article.title"]],
 
39
 
 
40
        ["tag", [
 
41
                "%script",
 
42
                ["attributes", [
 
43
                        ["punctuation", "{"],
 
44
                        ["symbol", ":type"],
 
45
                        ["operator", "="], ["operator", ">"],
 
46
                        ["string", ["\"text/javascript\""]],
 
47
                        ["punctuation", ","],
 
48
                        ["symbol", ":src"],
 
49
                        ["operator", "="], ["operator", ">"],
 
50
                        ["string", [
 
51
                                "\"javascripts/script_",
 
52
                                ["interpolation", [
 
53
                                        ["delimiter", "#{"],
 
54
                                        ["number", "42"],
 
55
                                        ["delimiter", "}"]
 
56
                                ]],
 
57
                                "\""
 
58
                        ]],
 
59
                        ["punctuation", "}"]
 
60
                ]]
 
61
        ]],
 
62
 
 
63
        ["tag", [
 
64
                "%div",
 
65
                ["attributes", [
 
66
                        ["punctuation", "{"],
 
67
                        ["symbol", ":id"],
 
68
                        ["operator", "="], ["operator", ">"],
 
69
                        ["punctuation", "["],
 
70
                        ["variable", "@item"],
 
71
                        ["punctuation", "."],
 
72
                        "type",
 
73
                        ["punctuation", ","],
 
74
                        ["variable", "@item"],
 
75
                        ["punctuation", "."],
 
76
                        "number",
 
77
                        ["punctuation", "]"],
 
78
                        ["punctuation", "}"]
 
79
                ]]
 
80
        ]],
 
81
 
 
82
        ["tag", [
 
83
                "%a",
 
84
                ["attributes", [
 
85
                        ["punctuation", "("],
 
86
                        ["attr-name", "title"],
 
87
                        ["punctuation", "="],
 
88
                        ["attr-value", "@title"],
 
89
                        ["attr-name", "href"],
 
90
                        ["punctuation", "="],
 
91
            ["attr-value", "href"],
 
92
            ["punctuation", ")"]
 
93
                ]]
 
94
        ]],
 
95
        ["tag", [
 
96
                "%input",
 
97
                ["attributes", [
 
98
                        ["punctuation", "("],
 
99
                        ["attr-name", "selected"],
 
100
                        ["punctuation", ")"]
 
101
                ]]
 
102
        ]],
 
103
 
 
104
        ["tag", [
 
105
                "%html",
 
106
                ["attributes", [
 
107
                        ["punctuation", "{"],
 
108
                        ["function", "html_attrs"],
 
109
                        ["punctuation", "("],
 
110
                        ["string", ["'fr-fr'"]],
 
111
                        ["punctuation", ")"],
 
112
                        ["punctuation", "}"]
 
113
                ]]
 
114
        ]],
 
115
 
 
116
        ["tag", [
 
117
                "%div",
 
118
                ["attributes", [
 
119
                        ["punctuation", "["],
 
120
                        ["variable", "@user"],
 
121
                        ["punctuation", ","],
 
122
                        ["symbol", ":greeting"],
 
123
                        ["punctuation", "]"]
 
124
                ]]
 
125
        ]],
 
126
        ["tag", [
 
127
                "%bar",
 
128
                ["attributes", [
 
129
                        ["punctuation", "["],
 
130
                        ["number", "290"],
 
131
                        ["punctuation", "]"]
 
132
                ]],
 
133
                "/"
 
134
        ]],
 
135
 
 
136
        ["tag", [
 
137
                "%div#Article.article.entry",
 
138
                ["attributes", [
 
139
                        ["punctuation", "{"],
 
140
                        ["symbol", ":id"],
 
141
                        ["operator", "="], ["operator", ">"],
 
142
                        ["variable", "@article"],
 
143
                        ["punctuation", "."],
 
144
                        "number",
 
145
                        ["punctuation", "}"]
 
146
                ]]
 
147
        ]],
 
148
 
 
149
        ["tag", ["#collection"]],
 
150
        ["tag", [".item"]],
 
151
 
 
152
        ["tag", ["%br/"]],
 
153
        ["tag", ["%blockquote", ["punctuation", "<"]]],
 
154
        ["tag", ["%img", ["punctuation", ">"]]]
 
155
]
 
156
 
 
157
----------------------------------------------------
 
158
 
 
159
Checks for tags: basic element names, attributes, html-style attributes,
 
160
attribute methods, boolean attributes, class and id shortcuts,
 
161
implicit div elements, empty tags and whitespace removal.
 
 
b'\\ No newline at end of file'