hamlit 2.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +16 -0
  3. data/.travis.yml +45 -0
  4. data/CHANGELOG.md +676 -0
  5. data/Gemfile +28 -0
  6. data/LICENSE.txt +44 -0
  7. data/README.md +150 -0
  8. data/REFERENCE.md +266 -0
  9. data/Rakefile +117 -0
  10. data/benchmark/boolean_attribute.haml +6 -0
  11. data/benchmark/class_attribute.haml +5 -0
  12. data/benchmark/common_attribute.haml +3 -0
  13. data/benchmark/data_attribute.haml +4 -0
  14. data/benchmark/dynamic_attributes/boolean_attribute.haml +4 -0
  15. data/benchmark/dynamic_attributes/class_attribute.haml +4 -0
  16. data/benchmark/dynamic_attributes/common_attribute.haml +2 -0
  17. data/benchmark/dynamic_attributes/data_attribute.haml +2 -0
  18. data/benchmark/dynamic_attributes/id_attribute.haml +2 -0
  19. data/benchmark/dynamic_boolean_attribute.haml +4 -0
  20. data/benchmark/etc/attribute_builder.haml +5 -0
  21. data/benchmark/etc/real_sample.haml +888 -0
  22. data/benchmark/etc/real_sample.rb +11 -0
  23. data/benchmark/etc/static_analyzer.haml +1 -0
  24. data/benchmark/etc/string_interpolation.haml +2 -0
  25. data/benchmark/etc/tags.haml +3 -0
  26. data/benchmark/etc/tags_loop.haml +2 -0
  27. data/benchmark/ext/build_data.rb +17 -0
  28. data/benchmark/ext/build_id.rb +13 -0
  29. data/benchmark/id_attribute.haml +3 -0
  30. data/benchmark/plain.haml +4 -0
  31. data/benchmark/script.haml +4 -0
  32. data/benchmark/slim/LICENSE +21 -0
  33. data/benchmark/slim/context.rb +11 -0
  34. data/benchmark/slim/run-benchmarks.rb +94 -0
  35. data/benchmark/slim/view.erb +23 -0
  36. data/benchmark/slim/view.haml +18 -0
  37. data/benchmark/slim/view.slim +17 -0
  38. data/benchmark/utils/benchmark_ips_extension.rb +43 -0
  39. data/bin/bench +77 -0
  40. data/bin/console +11 -0
  41. data/bin/ruby +3 -0
  42. data/bin/setup +7 -0
  43. data/bin/stackprof +27 -0
  44. data/bin/test +24 -0
  45. data/exe/hamlit +6 -0
  46. data/ext/hamlit/extconf.rb +10 -0
  47. data/ext/hamlit/hamlit.c +553 -0
  48. data/ext/hamlit/hescape.c +108 -0
  49. data/ext/hamlit/hescape.h +20 -0
  50. data/hamlit.gemspec +45 -0
  51. data/lib/hamlit.rb +11 -0
  52. data/lib/hamlit/attribute_builder.rb +173 -0
  53. data/lib/hamlit/attribute_compiler.rb +123 -0
  54. data/lib/hamlit/attribute_parser.rb +110 -0
  55. data/lib/hamlit/cli.rb +130 -0
  56. data/lib/hamlit/compiler.rb +97 -0
  57. data/lib/hamlit/compiler/children_compiler.rb +112 -0
  58. data/lib/hamlit/compiler/comment_compiler.rb +36 -0
  59. data/lib/hamlit/compiler/doctype_compiler.rb +46 -0
  60. data/lib/hamlit/compiler/script_compiler.rb +102 -0
  61. data/lib/hamlit/compiler/silent_script_compiler.rb +24 -0
  62. data/lib/hamlit/compiler/tag_compiler.rb +74 -0
  63. data/lib/hamlit/engine.rb +37 -0
  64. data/lib/hamlit/error.rb +15 -0
  65. data/lib/hamlit/escapable.rb +13 -0
  66. data/lib/hamlit/filters.rb +75 -0
  67. data/lib/hamlit/filters/base.rb +12 -0
  68. data/lib/hamlit/filters/cdata.rb +20 -0
  69. data/lib/hamlit/filters/coffee.rb +17 -0
  70. data/lib/hamlit/filters/css.rb +33 -0
  71. data/lib/hamlit/filters/erb.rb +10 -0
  72. data/lib/hamlit/filters/escaped.rb +22 -0
  73. data/lib/hamlit/filters/javascript.rb +33 -0
  74. data/lib/hamlit/filters/less.rb +20 -0
  75. data/lib/hamlit/filters/markdown.rb +10 -0
  76. data/lib/hamlit/filters/plain.rb +29 -0
  77. data/lib/hamlit/filters/preserve.rb +22 -0
  78. data/lib/hamlit/filters/ruby.rb +10 -0
  79. data/lib/hamlit/filters/sass.rb +15 -0
  80. data/lib/hamlit/filters/scss.rb +15 -0
  81. data/lib/hamlit/filters/text_base.rb +25 -0
  82. data/lib/hamlit/filters/tilt_base.rb +49 -0
  83. data/lib/hamlit/force_escapable.rb +29 -0
  84. data/lib/hamlit/helpers.rb +15 -0
  85. data/lib/hamlit/html.rb +14 -0
  86. data/lib/hamlit/identity.rb +13 -0
  87. data/lib/hamlit/object_ref.rb +30 -0
  88. data/lib/hamlit/parser.rb +49 -0
  89. data/lib/hamlit/parser/MIT-LICENSE +20 -0
  90. data/lib/hamlit/parser/README.md +30 -0
  91. data/lib/hamlit/parser/haml_buffer.rb +348 -0
  92. data/lib/hamlit/parser/haml_compiler.rb +553 -0
  93. data/lib/hamlit/parser/haml_error.rb +61 -0
  94. data/lib/hamlit/parser/haml_helpers.rb +727 -0
  95. data/lib/hamlit/parser/haml_options.rb +286 -0
  96. data/lib/hamlit/parser/haml_parser.rb +800 -0
  97. data/lib/hamlit/parser/haml_util.rb +288 -0
  98. data/lib/hamlit/parser/haml_xss_mods.rb +109 -0
  99. data/lib/hamlit/rails_helpers.rb +51 -0
  100. data/lib/hamlit/rails_template.rb +59 -0
  101. data/lib/hamlit/railtie.rb +10 -0
  102. data/lib/hamlit/ruby_expression.rb +32 -0
  103. data/lib/hamlit/string_splitter.rb +88 -0
  104. data/lib/hamlit/template.rb +28 -0
  105. data/lib/hamlit/utils.rb +18 -0
  106. data/lib/hamlit/version.rb +4 -0
  107. metadata +361 -0
@@ -0,0 +1,117 @@
1
+ require 'bundler/setup'
2
+ require 'bundler/gem_tasks'
3
+
4
+ #
5
+ # Prepend DevKit into compilation phase
6
+ #
7
+ if Gem.win_platform?
8
+ desc 'Activates DevKit'
9
+ task :devkit do
10
+ begin
11
+ require 'devkit'
12
+ rescue LoadError
13
+ abort 'Failed to load DevKit required for compilation'
14
+ end
15
+ end
16
+ task compile: :devkit
17
+ end
18
+
19
+ require 'rake/testtask'
20
+ if /java/ === RUBY_PLATFORM
21
+ # require 'rake/javaextensiontask'
22
+ # Rake::JavaExtensionTask.new(:hamlit) do |ext|
23
+ # ext.ext_dir = 'ext/java'
24
+ # ext.lib_dir = 'lib/hamlit'
25
+ # end
26
+
27
+ task :compile do
28
+ # dummy for now
29
+ end
30
+ else
31
+ require 'rake/extensiontask'
32
+ Rake::ExtensionTask.new(:hamlit) do |ext|
33
+ ext.lib_dir = 'lib/hamlit'
34
+ end
35
+ end
36
+
37
+ Dir['benchmark/*.rake'].each { |b| import(b) }
38
+
39
+ namespace :haml do
40
+ Rake::TestTask.new do |t|
41
+ t.libs << 'lib' << 'test'
42
+ files = Dir['test/haml/*_test.rb']
43
+ files << 'test/haml/haml-spec/*_test.rb'
44
+ t.ruby_opts = %w[-rtest_helper]
45
+ t.test_files = files
46
+ t.verbose = true
47
+ end
48
+ end
49
+
50
+ namespace :hamlit do
51
+ Rake::TestTask.new do |t|
52
+ t.libs << 'lib' << 'test'
53
+ t.ruby_opts = %w[-rtest_helper]
54
+ t.test_files = Dir['test/hamlit/**/*_test.rb']
55
+ t.verbose = true
56
+ end
57
+ end
58
+
59
+ namespace :test do
60
+ Rake::TestTask.new(:all) do |t|
61
+ t.libs << 'lib' << 'test'
62
+ files = Dir['test/hamlit/**/*_test.rb']
63
+ files += Dir['test/haml/*_test.rb']
64
+ files << 'test/haml/haml-spec/*_test.rb'
65
+ t.ruby_opts = %w[-rtest_helper]
66
+ t.test_files = files
67
+ t.verbose = true
68
+ end
69
+
70
+ Rake::TestTask.new(:spec) do |t|
71
+ t.libs << 'lib' << 'test'
72
+ t.ruby_opts = %w[-rtest_helper]
73
+ t.test_files = %w[test/haml/haml-spec/ugly_test.rb test/haml/haml-spec/pretty_test.rb]
74
+ t.verbose = true
75
+ end
76
+
77
+ Rake::TestTask.new(:engine) do |t|
78
+ t.libs << 'lib' << 'test'
79
+ t.ruby_opts = %w[-rtest_helper]
80
+ t.test_files = %w[test/haml/engine_test.rb]
81
+ t.verbose = true
82
+ end
83
+
84
+ Rake::TestTask.new(:filters) do |t|
85
+ t.libs << 'lib' << 'test'
86
+ t.ruby_opts = %w[-rtest_helper]
87
+ t.test_files = %w[test/haml/filters_test.rb]
88
+ t.verbose = true
89
+ end
90
+
91
+ Rake::TestTask.new(:helper) do |t|
92
+ t.libs << 'lib' << 'test'
93
+ t.ruby_opts = %w[-rtest_helper]
94
+ t.test_files = %w[test/haml/helper_test.rb]
95
+ t.verbose = true
96
+ end
97
+
98
+ Rake::TestTask.new(:template) do |t|
99
+ t.libs << 'lib' << 'test'
100
+ t.ruby_opts = %w[-rtest_helper]
101
+ t.test_files = %w[test/haml/template_test.rb]
102
+ t.verbose = true
103
+ end
104
+ end
105
+
106
+ desc 'bench task for CI'
107
+ task bench: :compile do
108
+ if ENV['SLIM_BENCH'] == '1'
109
+ cmd = %w[bundle exec ruby benchmark/slim/run-benchmarks.rb]
110
+ else
111
+ cmd = ['bin/bench', 'bench', ('-c' if ENV['COMPILE'] == '1'), *ENV['TEMPLATE'].split(',')].compact
112
+ end
113
+ exit system(*cmd)
114
+ end
115
+
116
+ task default: %w[compile hamlit:test]
117
+ task test: %w[compile test:all]
@@ -0,0 +1,6 @@
1
+ %input{ disabled: false }
2
+ %input{ disabled: true }
3
+ - disabled = false
4
+ %input{ disabled: disabled }
5
+ - disabled = true
6
+ %input{ disabled: disabled }
@@ -0,0 +1,5 @@
1
+ .book{ class: 'content active' }
2
+ .book(class='content active')
3
+
4
+ - klass = %w[content active]
5
+ .book{ class: klass }
@@ -0,0 +1,3 @@
1
+ %a{ href: '&"\'<>' }
2
+ - href = '&"\'<>'
3
+ %a{ href: href }
@@ -0,0 +1,4 @@
1
+ %div{ data: { disabled: false } }
2
+ %div{ data: { disabled: true } }
3
+ - hash = { 'user' => { id: 1234, name: 'k0kubun' }, book_id: 5432 }
4
+ %div{ data: hash } data
@@ -0,0 +1,4 @@
1
+ - hash = { disabled: false }
2
+ %input{ hash }
3
+ - hash = { disabled: true }
4
+ %input{ hash }
@@ -0,0 +1,4 @@
1
+ - hash = { class: %w[content active] }
2
+ .book{ hash }
3
+ - arr = %w[foo bar]
4
+ .book(class=arr){ hash }
@@ -0,0 +1,2 @@
1
+ - hash = { href: '&"\'<>' }
2
+ %a{ hash }
@@ -0,0 +1,2 @@
1
+ - hash = { data: { 'user' => { id: 1234, name: 'k0kubun' }, book_id: 5432 } }
2
+ %div{ hash } data
@@ -0,0 +1,2 @@
1
+ - hash = { id: %w[content active] }
2
+ #book{ hash }
@@ -0,0 +1,4 @@
1
+ - disabled = false
2
+ %input{ disabled: disabled }
3
+ - disabled = true
4
+ %input{ disabled: disabled }
@@ -0,0 +1,5 @@
1
+ - h = { 'user' => { id: 1234, name: 'eagletmt' }, book_id: 5432 }
2
+ - c = %w[content active]
3
+
4
+ %span.book{data: h, class: c}
5
+ Book
@@ -0,0 +1,888 @@
1
+ #id-1
2
+ = render partial: 'test'
3
+
4
+ %ul#id-2.class-1.class-2
5
+
6
+ %section#id-3
7
+ .class-3 string-1
8
+ .class-4
9
+ .class-5 string-2
10
+ %pre.class-6(readonly="readonly" style='width:1px')
11
+ :preserve
12
+ .class-7 string-3
13
+
14
+ .class-8 string-4
15
+ %pre.class-9(readonly="readonly" style='width:2px')
16
+ :preserve
17
+ .class-10 string-5
18
+ %p
19
+ Hello world
20
+
21
+ .class-12 string-6
22
+ %pre.class-13(readonly="readonly" style='width:3px')
23
+ :preserve
24
+ .class-14 string-7
25
+ %p
26
+ Hello world
27
+
28
+ %section#id-4
29
+ .class-17 string-8
30
+ .class-18
31
+ .class-19 string-9
32
+ %pre.class-20(readonly="readonly" style='width:4px')
33
+ :preserve
34
+ .class-21 string-10
35
+
36
+ .class-22 string-11
37
+ %pre.class-23(readonly="readonly" style='width:5px')
38
+ :preserve
39
+ .class-24 string-12
40
+
41
+ .class-25.class-26 Hello world
42
+ %pre.class-27(readonly="readonly" style='width:6px')
43
+ :preserve
44
+ .class-28.class-29 Hello world
45
+
46
+ %section#id-5
47
+ .class-30 string-13
48
+ .class-31 string-14
49
+ .class-32
50
+ %pre.class-33(readonly="readonly" style='width:7px')
51
+ :preserve
52
+ .class-34 string-15
53
+
54
+ %section#id-6
55
+ .class-35 string-16
56
+ %ul.class-36.class-37
57
+ %li
58
+ = link_to 'link', '#'
59
+ %li
60
+ = link_to 'link', '#', class: 'klass'
61
+ %li
62
+ = link_to 'link', '#', class: 'klass'
63
+ %li
64
+ = link_to 'link', '#', class: 'klass'
65
+ %li
66
+ = link_to 'link', '#', class: 'klass'
67
+ .class-38
68
+ %p text-17
69
+ %p text-18
70
+ %pre.class-41(readonly="readonly" style='width:8px')
71
+ :preserve
72
+ %ul.class-42.class-43
73
+ %li
74
+ = link_to 'link', '#'
75
+ %li
76
+ = link_to 'link', '#', class: 'klass'
77
+ %li
78
+ = link_to 'link', '#', class: 'klass'
79
+ %li
80
+ = link_to 'link', '#', class: 'klass'
81
+ %li
82
+ = link_to 'link', '#', class: 'klass'
83
+
84
+ %section#id-7
85
+ .class-44 string-19
86
+ %ul.class-45.class-46
87
+ %li#id-8
88
+ = link_to 'link', '#', class: 'klass1 klass2'
89
+ .class-47.class-48.class-49
90
+ Hello world
91
+ .class-50
92
+ %pre.class-51(readonly="readonly" style='width:9px')
93
+ :preserve
94
+ %ul.class-52.class-53
95
+ %li#id-10
96
+ = link_to 'link',
97
+ '#id-11',
98
+ class: 'klass1 klass2'
99
+ .class-54.class-55.class-56
100
+ Hello world
101
+
102
+ %section#id-12
103
+ .class-57 string-20
104
+ %ul.class-58.class-59
105
+ %li
106
+ = link_to 'link', '#'
107
+ .class-60 string-21
108
+ .class-61 string-22
109
+ %li
110
+ = link_to 'link', '#'
111
+ .class-62 string-23
112
+ .class-63 string-24
113
+ .class-64
114
+ %pre.class-65(readonly="readonly" style='width:10px')
115
+ :preserve
116
+ %ul.class-66.class-67
117
+ %li
118
+ = link_to 'link', '#'
119
+ .class-68 string-25
120
+ .class-69 string-26
121
+ %li
122
+ = link_to 'link', '#'
123
+ .class-70 string-27
124
+ .class-71 string-28
125
+
126
+ %section#id-13
127
+ .class-72 string-29
128
+ %ul.class-73.class-74
129
+ %li
130
+ = link_to 'link', '#'
131
+ .class-75 string-30
132
+ .class-76 string-31
133
+ %li
134
+ = link_to 'link', '#'
135
+ = image_tag 'https://google.com/favicon.ico', class: 'klass1'
136
+ .class-78 string-32
137
+ %li
138
+ = link_to 'link', '#'
139
+ = image_tag 'https://google.com/favicon.ico', class: 'klass1'
140
+ .class-80
141
+ .class-81 string-33
142
+ .class-82 string-34
143
+ %li
144
+ = link_to 'link', '#'
145
+ = image_tag 'https://google.com/favicon.ico', class: 'klass1'
146
+ .class-84
147
+ .class-85 string-35
148
+ .class-86 string-36
149
+ %li
150
+ = link_to 'link', '#'
151
+ = image_tag 'https://google.com/favicon.ico', class: 'klass1'
152
+ .class-88 string-37
153
+ .class-89 string-38
154
+ .class-90
155
+ %pre.class-91(readonly="readonly" style='width:11px')
156
+ :preserve
157
+ %ul.class-92.class-93
158
+ %li
159
+ = link_to 'link', '#'
160
+ .class-94 string-39
161
+ .class-95 string-40
162
+ %li
163
+ = link_to 'link', '#'
164
+ = image_tag class: 'klass1'
165
+ .class-96 string-41
166
+ %li
167
+ = link_to 'link', '#'
168
+ = image_tag class: 'klass1'
169
+ .class-97
170
+ .class-98 string-42
171
+ .class-99 string-43
172
+ %li
173
+ = link_to 'link', '#'
174
+ = image_tag class: 'klass1'
175
+ .class-100
176
+ .class-101 string-44
177
+ .class-102 string-45
178
+ %li
179
+ = link_to 'link', '#'
180
+ = image_tag class: 'klass1'
181
+ .class-103 string-46
182
+ .class-104 string-47
183
+
184
+ %section#id-14
185
+ .class-105 string-48
186
+ %ul.class-106.class-107.class-108
187
+ %li
188
+ = link_to 'link', '#'
189
+ %li
190
+ = link_to 'link', '#'
191
+ %li
192
+ = link_to 'link', '#'
193
+ %li
194
+ = link_to 'link', '#'
195
+
196
+ .class-109
197
+ %pre.class-110(readonly="readonly" style='width:12px')
198
+ :preserve
199
+ %ul.class-111.class-112.class-113
200
+ %li
201
+ = link_to 'link', '#'
202
+ %li
203
+ = link_to 'link', '#'
204
+
205
+ %section#id-15
206
+ .class-114 string-49
207
+ %ul.class-115.class-116.class-117
208
+ %li
209
+ = link_to 'link', '#', class: 'klass'
210
+ = image_tag 'https://github.com/favicon.ico', class: 'klass'
211
+ .class-119 string-50
212
+ %li
213
+ = link_to 'link', '#', class: 'klass'
214
+ = image_tag 'https://github.com/favicon.ico', class: 'klass'
215
+ .class-121 string-51
216
+ %li
217
+ = link_to 'link', '#', class: 'klass'
218
+ = image_tag 'https://github.com/favicon.ico', class: 'klass'
219
+ .class-123 string-52
220
+ %li
221
+ = link_to 'link', '#', class: 'klass'
222
+ = image_tag 'https://github.com/favicon.ico', class: 'klass'
223
+ .class-125 string-53
224
+
225
+ .class-126
226
+ %pre.class-127(readonly="readonly" style='width:13px')
227
+ :preserve
228
+ %ul.class-128.class-129.class-130
229
+ %li
230
+ = link_to 'link', '#'
231
+ = image_tag clsss: 'klass'
232
+ .class-131 string-54
233
+ %li
234
+ = link_to 'link', '#'
235
+ = image_tag clsss: 'klass'
236
+ .class-132 string-55
237
+
238
+ %section#id-16
239
+ .class-133 string-56
240
+ %ul.class-134.class-135
241
+ %li= link_to 'link', '#'
242
+ %li= link_to 'link', '#'
243
+ %li= link_to 'link', '#'
244
+ .class-136
245
+ %pre.class-137(readonly="readonly" style='width:14px')
246
+ :preserve
247
+ %ul.class-138.class-139
248
+ %li= link_to 'link', '#'
249
+ %li= link_to 'link', '#'
250
+ %li= link_to 'link', '#'
251
+
252
+ %section#id-17
253
+ .class-140 string-57
254
+ .class-141
255
+ %ul.class-142
256
+ %li
257
+ = image_tag 'https://github.com/favicon.ico'
258
+ %li
259
+ = image_tag 'https://github.com/favicon.ico'
260
+ %li
261
+ = image_tag 'https://github.com/favicon.ico'
262
+
263
+
264
+ %pre.class-146(readonly="readonly" style='width:15px')
265
+ :preserve
266
+ %ul.class-147
267
+ %li
268
+ = image_tag ''
269
+ %li
270
+ = image_tag ''
271
+ %li
272
+ = image_tag ''
273
+
274
+ %section#id-18
275
+ .class-148 string-58
276
+ .class-149
277
+ .class-150
278
+ .class-151.class-152
279
+ = image_tag 'https://github.com/favicon.ico'
280
+ .class-154.class-155
281
+ .class-156-title string-59
282
+ Hello world
283
+
284
+ %pre.class-157(readonly="readonly" style='width:16px')
285
+ :preserve
286
+ .class-158
287
+ .class-159.class-160
288
+ Hello world
289
+ .class-161.class-162
290
+ Hello world
291
+
292
+ %p text-60
293
+
294
+ %section#id-19
295
+ .class-164 string-61
296
+ .class-165
297
+ .class-166
298
+ .class-167
299
+ = image_tag 'https://github.com/favicon.ico'
300
+ .class-169
301
+ = image_tag 'https://github.com/favicon.ico'
302
+ .class-171
303
+ = image_tag 'https://github.com/favicon.ico'
304
+
305
+ .class-173
306
+ .class-174-title string-62
307
+ str
308
+
309
+ %pre.class-175(readonly="readonly" style='width:17px')
310
+ :preserve
311
+ .class-176
312
+ .class-177
313
+ = image_tag ''
314
+ .class-178
315
+ = image_tag ''
316
+ .class-179
317
+ = image_tag ''
318
+ .class-180
319
+ content
320
+ %p text-63
321
+ %p text-64
322
+
323
+
324
+ %section#id-20
325
+ .class-182 string-65
326
+ .class-183
327
+ %ul.class-184.class-185
328
+ %li.class-186.class-187
329
+ %span.class-188 str
330
+ %li.class-189
331
+ = link_to 'link', '#', class: 'klass'
332
+ .class-190
333
+ %pre.class-191(readonly="readonly" style='width:18px')
334
+ :preserve
335
+ .class-192
336
+ %ul.class-193.class-194
337
+ %li.class-195.class-196
338
+ %span.class-197 str
339
+ %li.class-198
340
+ = link_to 'link', '#', class: 'klass'
341
+
342
+ %section#id-21
343
+ .class-199 string-66
344
+ .class-200
345
+ %ul.class-201
346
+ %li.class-202.class-203
347
+ %span.class-204 str
348
+ %li.class-205
349
+ = link_to 'link', '#', class: 'klass'
350
+ %li.class-206
351
+ = link_to 'link', '#', class: 'klass'
352
+ .class-207
353
+ %pre.class-208(readonly="readonly" style='width:19px')
354
+ :preserve
355
+ .class-209
356
+ %ul.class-210
357
+ %li.class-211.class-212
358
+ %span.class-213 str
359
+ %li.class-214
360
+ = link_to 'link', '#', class: 'klass'
361
+ %li.class-215
362
+ = link_to 'link', '#', class: 'klass'
363
+
364
+ %section#id-22
365
+ .class-216 string-67
366
+ %ul.class-217
367
+ %li.class-218
368
+ = link_to 'link', '#'
369
+ %li
370
+ = link_to 'link', '#'
371
+ %li
372
+ = link_to 'link', '#'
373
+ .class-219
374
+ %pre.class-220(readonly="readonly" style='width:20px')
375
+ :preserve
376
+ %ul.class-221
377
+ %li.class-222
378
+ = link_to 'link', '#'
379
+ %li
380
+ = link_to 'link', '#'
381
+ %li
382
+ = link_to 'link', '#'
383
+
384
+ %p text-68
385
+
386
+ %section#id-23
387
+ .class-223 string-69
388
+ %ul.class-224
389
+ %li
390
+ = link_to 'link', '#'
391
+ %li
392
+ = link_to 'link', '#'
393
+ %li
394
+ = link_to 'link', '#'
395
+ .class-225
396
+ %pre.class-226(readonly="readonly" style='width:21px')
397
+ :preserve
398
+ %ul.class-227
399
+ %li
400
+ = link_to 'link', '#'
401
+ %li
402
+ = link_to 'link', '#'
403
+ %li
404
+ = link_to 'link', '#'
405
+
406
+ %section#id-24
407
+ .class-228 string-70
408
+ .class-229
409
+ %a(href="#" class="button") Hello world
410
+ %p text-71
411
+ %pre.class-230(readonly="readonly" style='width:22px')
412
+ :preserve
413
+ = link_to 'link', '#', class: 'klass'
414
+
415
+ %a(href="#" class="button min") Hello world
416
+ %pre.class-231(readonly="readonly" style='width:23px')
417
+ :preserve
418
+ = link_to 'link', '#', class: 'klass'
419
+
420
+ %section#id-25
421
+ .class-232 string-72
422
+ .class-233
423
+ %a(href="#" class="klass") Hello world
424
+ %p text-73
425
+ %pre.class-234(readonly="readonly" style='width:24px')
426
+ :preserve
427
+ = link_to 'link', '#',
428
+ class: 'klass'
429
+
430
+ %a(href="#" class="klass") Hello world
431
+ %pre.class-235(readonly="readonly" style='width:25px')
432
+ :preserve
433
+ = link_to 'link', '#',
434
+ class: 'klass'
435
+
436
+ %a(href="#" class="klass") Hello world
437
+ %pre.class-236(readonly="readonly" style='width:26px')
438
+ :preserve
439
+ = link_to 'link', '#',
440
+ class: 'klass'
441
+
442
+ %section#id-26
443
+ .class-237 string-74
444
+ .class-238
445
+ %a(href="#" class="klass") Hello world
446
+ %p text-75
447
+ %pre.class-239(readonly="readonly" style='width:27px')
448
+ :preserve
449
+ = link_to 'link', '#',
450
+ class: 'klass'
451
+ %a(href="#" class="klass") Hello world
452
+ %pre.class-240(readonly="readonly" style='width:28px')
453
+ :preserve
454
+ = link_to 'link', '#',
455
+ class: 'klass'
456
+ %a(href="#" class="klass") Hello world
457
+ %pre.class-241(readonly="readonly" style='width:29px')
458
+ :preserve
459
+ = link_to 'link', '#',
460
+ class: 'klass'
461
+
462
+ %section#id-27
463
+ .class-242 string-76
464
+ .class-243
465
+ %a(href="#" class="klass") Hello world
466
+ %p text-77
467
+ %pre.class-244(readonly="readonly" style='width:30px')
468
+ :preserve
469
+ = link_to 'link', '#',
470
+ class: 'klass'
471
+ %a(href="#" class="klass") Hello world
472
+ %pre.class-245(readonly="readonly" style='width:31px')
473
+ :preserve
474
+ = link_to 'link', '#',
475
+ class: 'klass'
476
+ %a(href="#" class="klass") Hello world
477
+ %pre.class-246(readonly="readonly" style='width:32px')
478
+ :preserve
479
+ = link_to 'link', '#',
480
+ class: 'klass'
481
+
482
+ %section#id-28
483
+ .class-247 string-78
484
+ %a(href="#" class="klass")
485
+ str
486
+ %span.class-248
487
+ str
488
+ %b text-79
489
+ str
490
+ .class-249
491
+ %pre.class-250(readonly="readonly" style='width:33px')
492
+ :preserve
493
+ = link_to 'link', '#'
494
+ %span.class-251
495
+ str
496
+ %b text-80
497
+ str
498
+
499
+ %section#id-29
500
+ .class-252 string-81
501
+ %label.class-253{for: 'f1_c1'}
502
+ %input{type: 'checkbox', id: 'f1_c1', checked: 'checked'}
503
+ str
504
+ %label.class-254{for: 'f1_c2'}
505
+ %input{type: 'checkbox', id: 'f1_c2'}
506
+ str
507
+ .class-255
508
+ %pre.class-256(readonly="readonly" style='width:34px')
509
+ :preserve
510
+ %label.class-257{for: 'f1_c1'}
511
+ %input{type: 'checkbox', id: 'f1_c1', checked: 'checked'}
512
+ str
513
+ %label.class-258{for: 'f1_c2'}
514
+ %input{type: 'checkbox', id: 'f1_c2'}
515
+ str
516
+
517
+ %label.class-259{for: 'f1_r1'}
518
+ %input{type: 'radio', name: 'form1', id: 'f1_r1', checked: 'checked'}
519
+ str
520
+ %label.class-260{for: 'f1_r2'}
521
+ %input{type: 'radio', name: 'form1', id: 'f1_r2'}
522
+ str
523
+ .class-261
524
+ %pre.class-262(readonly="readonly" style='width:35px')
525
+ :preserve
526
+ %label.class-263{for: 'f1_r1'}
527
+ %input{type: 'radio', name: 'form1', id: 'f1_r1', checked: 'checked'}
528
+ str
529
+ %label.class-264{for: 'f1_r2'}
530
+ %input{type: 'radio', name: 'form1', id: 'f1_r2'}
531
+ str
532
+
533
+ %section#id-30
534
+ .class-265 string-82
535
+ %ul.class-266.class-267
536
+ %li
537
+ %label.class-268{for: 'f2_c1'}
538
+ %input{type: 'checkbox', id: 'f2_c1', checked: 'checked'}
539
+ str
540
+ %li
541
+ %label.class-269{for: 'f2_c2'}
542
+ %input{type: 'checkbox', id: 'f2_c2'}
543
+ str
544
+ .class-270
545
+ %pre.class-271(readonly="readonly" style='width:36px')
546
+ :preserve
547
+ %ul.class-272.class-273
548
+ %li
549
+ %label.class-274{for: 'f2_c1'}
550
+ %input{type: 'checkbox', id: 'f2_c1', checked: 'checked'}
551
+ str
552
+ %li
553
+ %label.class-275{for: 'f2_c2'}
554
+ %input{type: 'checkbox', id: 'f2_c2'}
555
+ str
556
+
557
+ %ul.class-276.class-277
558
+ %li
559
+ %label.class-278{for: 'f2_r1'}
560
+ %input{type: 'radio', name: 'form2', id: 'f2_r1', checked: 'checked'}
561
+ str
562
+ %li
563
+ %label.class-279{for: 'f2_r2'}
564
+ %input{type: 'radio', name: 'form2', id: 'f2_r2'}
565
+ str
566
+ .class-280
567
+ %pre.class-281(readonly="readonly" style='width:37px')
568
+ :preserve
569
+ %ul.class-282.class-283
570
+ %li
571
+ %label.class-284{for: 'f2_r1'}
572
+ %input{type: 'radio', name: 'form2', id: 'f2_r1', checked: 'checked'}
573
+ str
574
+ %li
575
+ %label.class-285{for: 'f2_r2'}
576
+ %input{type: 'radio', name: 'form2', id: 'f2_r2'}
577
+ str
578
+
579
+ %section#id-31
580
+ .class-286 string-83
581
+ .class-287
582
+ %ul.class-288
583
+ %li text-84
584
+ %li text-85
585
+ %pre.class-289(readonly="readonly" style='width:38px')
586
+ :preserve
587
+ %ul.class-290
588
+ %li text-86
589
+ %li text-87
590
+
591
+ %ul.class-291.class-292
592
+ %li text-88
593
+ %li text-89
594
+ %pre.class-293(readonly="readonly" style='width:39px')
595
+ :preserve
596
+ %ul.class-294.class-295
597
+ %li text-90
598
+ %li text-91
599
+
600
+ %ul.class-296.class-297
601
+ %li text-92
602
+ %li text-93
603
+ %pre.class-298(readonly="readonly" style='width:40px')
604
+ :preserve
605
+ %ul.class-299.class-300
606
+ %li text-94
607
+ %li text-95
608
+
609
+ %ul.class-301.class-302
610
+ %li text-96
611
+ %li text-97
612
+ %pre.class-303(readonly="readonly" style='width:41px')
613
+ :preserve
614
+ %ul.class-304.class-305
615
+ %li text-98
616
+ %li text-99
617
+
618
+ %section#id-32
619
+ .class-306 string-100
620
+ .class-307
621
+ = image_tag '#'
622
+ = image_tag '#'
623
+ %pre.class-312(readonly="readonly" style='width:42px')
624
+ :preserve
625
+ = image_tag '#'
626
+ = image_tag '#'
627
+
628
+ %section#id-33
629
+ .class-315 string-101
630
+ .class-316
631
+ = image_tag '#'
632
+ %span.class-317 str
633
+ %pre.class-318(readonly="readonly" style='width:43px')
634
+ :preserve
635
+ = image_tag '#'
636
+ %span.class-319 str
637
+
638
+ %section#id-34
639
+ .class-320 string-102
640
+ .class-321
641
+ %a(href="#" class="klass")
642
+ %pre.class-322(readonly="readonly" style='width:44px')
643
+ :preserve
644
+ = link_to '', '#', class: 'klass'
645
+
646
+ %section#id-35
647
+ .class-323 string-103
648
+ .class-324
649
+ %a(href="#" class="klass")
650
+ %pre.class-325(readonly="readonly" style='width:45px')
651
+ :preserve
652
+ = link_to '', '#', class: 'klass'
653
+
654
+ %section#id-36
655
+ .class-326 string-104
656
+ .class-327
657
+ .class-328
658
+ %a(rel="prev" href="#")
659
+ %a(rel="next" href="#")
660
+ %pre.class-329(readonly="readonly" style='width:46px')
661
+ :preserve
662
+ .class-330
663
+ = link_to '', '#', rel: 'klass'
664
+ = link_to '', '#', rel: 'klass'
665
+
666
+ %section#id-37
667
+ .class-331 string-105
668
+ .class-332
669
+ .class-333
670
+ .class-334
671
+ %strong text-106
672
+ %span text-107
673
+ .class-335{ style: "width: 50%;" }
674
+
675
+ %pre.class-336{ readonly: "readonly", style: "height: 120px" }
676
+ :preserve
677
+ .class-337
678
+ .class-338
679
+ %strong text-108
680
+ %span text-109
681
+ .class-339{ style: "width: 50%;" }
682
+
683
+ .class-340.class-341
684
+ .class-342
685
+ %strong text-110
686
+ %span text-111
687
+ .class-343{ style: "width: 50%;" }
688
+
689
+ %pre.class-344{ readonly: "readonly", style: "height: 120px" }
690
+ :preserve
691
+ .class-345.class-346
692
+ .class-347
693
+ %strong text-112
694
+ %span text-113
695
+ .class-348{ style: "width: 50%;" }
696
+
697
+ %section#id-38
698
+ .class-349 string-114
699
+ .class-350
700
+ = render '#'
701
+ = render '#'
702
+ %pre.class-351(readonly="readonly" style='width:47px')
703
+ :preserve
704
+ = render '#'
705
+ = render '#'
706
+
707
+ %p text-115
708
+ %p text-116
709
+
710
+ %section#id-39
711
+ .class-353 string-117
712
+ .class-354
713
+ = link_to 'link', '#', class: 'klass1 klass2', :'data-foo_bar' => 'foo!!'
714
+ .class-355
715
+ .class-356 string-118
716
+ %pre.class-357(readonly="readonly" style='width:48px')
717
+ :preserve
718
+ = link_to 'link', '#',
719
+ class: 'klass1 klass2',
720
+ :'data-foo_bar' => 'foo!!'
721
+ .class-358 string-119
722
+ %pre.class-359(readonly="readonly" style='width:49px')
723
+ :preserve
724
+ foo.bar('Hoge')
725
+
726
+ %section#id-40
727
+ .class-361 string-120
728
+ .class-362
729
+ = link_to 'link', '#', class: 'klass1 klass2 klass3'
730
+ .class-363
731
+ .class-364 string-121
732
+ %pre.class-365(readonly="readonly" style='width:50px')
733
+ :preserve
734
+ = link_to 'link', '#',
735
+ class: 'klass1 klass2 klass3'
736
+
737
+ .class-366 string-122
738
+ %pre.class-367(readonly="readonly" style='width:51px')
739
+ :preserve
740
+ #id-43.class-368.class-369
741
+ .class-370
742
+ .class-371 string-123
743
+ %a.class-372{href: "#"}
744
+ str
745
+
746
+ %p text-124
747
+ %p text-125
748
+
749
+ .class-373 string-126
750
+ %pre.class-374(readonly="readonly" style='width:52px')
751
+ :preserve
752
+ // hello
753
+ $(window).bind('click', function(event) {
754
+ });
755
+
756
+ // hello
757
+ $('#id-44').bind('click', function(event) {
758
+ });
759
+
760
+ // world
761
+ $('#id-45').bind('click', function(event) {
762
+ });
763
+
764
+ %p text-127
765
+
766
+ %section#id-46
767
+ .class-378 string-128
768
+ .class-379
769
+ %ul.class-380
770
+ %li.class-381
771
+ str1
772
+ %li.class-382
773
+ str2
774
+ %li.class-383
775
+ str3
776
+ :javascript
777
+ $('.class-384').foo({bar: '.class-386'});
778
+ :css
779
+ .class-387 {
780
+ min-height: 13px;
781
+ }
782
+ .class-388 {
783
+ height: 1px;
784
+ background: #000;
785
+ padding: 1px;
786
+ text-align: center;
787
+ }
788
+ .class-390 {
789
+ background: #000;
790
+ }
791
+ .class-392 {
792
+ background: #000;
793
+ }
794
+
795
+ .class-394
796
+ %pre.class-395(readonly="readonly" style='width:53px')
797
+ :preserve
798
+ .class-396
799
+ %ul.class-397
800
+ %li.class-398 str1
801
+ %li.class-399 str2
802
+ %li.class-400 str3
803
+ :javascript
804
+ $('.class-401').bar({foo: '.class-403'});
805
+
806
+ %ul.class-404.class-405
807
+ %li= link_to 'link', '#'
808
+ %li= link_to 'link', '#'
809
+ %li= link_to 'link', '#'
810
+
811
+ .class-406
812
+ %ul.class-407
813
+ %li#id-52A.class-408 str1
814
+ %li#id-53B.class-409 str2
815
+ %li#id-54C.class-410 str3
816
+
817
+ :javascript
818
+ $('.class-411').click({foo: '.class-413 > li > a'});
819
+
820
+ :css
821
+ .class-414 {
822
+ height: 1px;
823
+ background: #000;
824
+ padding: 1px;
825
+ text-align: center;
826
+ }
827
+ .class-416 {
828
+ background: #000;
829
+ }
830
+ .class-418 {
831
+ background: #000;
832
+ }
833
+
834
+ .class-420
835
+ %pre.class-421(readonly="readonly" style='width:54px')
836
+ :preserve
837
+ %ul.class-422.class-423
838
+ %li= link_to 'link', '#'
839
+ %li= link_to 'link', '#'
840
+ %li= link_to 'link', '#'
841
+
842
+ .class-424
843
+ %ul.class-425
844
+ %li#id-60A.class-426 str1
845
+ %li#id-61B.class-427 str2
846
+ %li#id-62C.class-428 str3
847
+
848
+ :javascript
849
+ $('.class-429').bind({links: '.klass'});
850
+
851
+ %section#id-63
852
+ .class-432 string-136
853
+ .class-433
854
+ .class-434 string-137
855
+ %pre.class-435(readonly="readonly" style='width:55px')
856
+ :preserve
857
+ #id-64
858
+ -# hello
859
+
860
+ .class-436
861
+ -# world
862
+
863
+ %span.class-437
864
+
865
+ #id-65
866
+ -# hey
867
+ .class-438 string-138
868
+ %pre.class-439(readonly="readonly" style='width:56px')
869
+ :preserve
870
+ // hello
871
+ $(document).bind('click', function(event) {
872
+ });
873
+
874
+ // world
875
+ $(document).bind('click', function(event) {
876
+ });
877
+
878
+ #id-66XXX.class-442.class-443
879
+ .class-444
880
+ .class-445 string-139
881
+
882
+ %a.class-446{href: "#"}
883
+ str
884
+
885
+ :javascript
886
+ (function ($) {
887
+ $(".foo").removeClass("bar");
888
+ })(jQuery);