faml 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/benchmark/compiling.rb +1 -0
  4. data/benchmark/context.rb +1 -0
  5. data/benchmark/rendering.rb +1 -0
  6. data/benchmark/slim.rb +1 -0
  7. data/ext/attribute_builder/extconf.rb +1 -0
  8. data/faml.gemspec +1 -1
  9. data/haml_spec_test.rb +1 -0
  10. data/incompatibilities/README.md +1 -1
  11. data/incompatibilities/spec/compiler_newline_spec.md +1 -1
  12. data/incompatibilities/spec/render/attribute_spec.md +314 -28
  13. data/incompatibilities/spec/render/comment_spec.md +1 -1
  14. data/incompatibilities/spec/render/doctype_spec.md +1 -1
  15. data/incompatibilities/spec/render/element_spec.md +1 -1
  16. data/incompatibilities/spec/render/filters/cdata_spec.md +1 -1
  17. data/incompatibilities/spec/render/filters/css_spec.md +1 -1
  18. data/incompatibilities/spec/render/filters/escaped_spec.md +1 -1
  19. data/incompatibilities/spec/render/filters/javascript_spec.md +1 -1
  20. data/incompatibilities/spec/render/filters/markdown_spec.md +1 -1
  21. data/incompatibilities/spec/render/filters/plain_spec.md +2 -2
  22. data/incompatibilities/spec/render/filters/preserve_spec.md +1 -1
  23. data/incompatibilities/spec/render/helpers_spec.md +2 -2
  24. data/incompatibilities/spec/render/multiline_spec.md +2 -2
  25. data/incompatibilities/spec/render/newline_spec.md +4 -4
  26. data/incompatibilities/spec/render/plain_spec.md +1 -1
  27. data/incompatibilities/spec/render/sanitize_spec.md +2 -2
  28. data/incompatibilities/spec/render/silent_script_spec.md +1 -1
  29. data/incompatibilities/spec/render/unescape_spec.md +3 -3
  30. data/lib/faml.rb +1 -0
  31. data/lib/faml/attribute_compiler.rb +1 -0
  32. data/lib/faml/attribute_optimizer.rb +14 -3
  33. data/lib/faml/cli.rb +1 -0
  34. data/lib/faml/compiler.rb +1 -0
  35. data/lib/faml/engine.rb +1 -0
  36. data/lib/faml/error.rb +1 -0
  37. data/lib/faml/filter_compilers.rb +1 -0
  38. data/lib/faml/filter_compilers/base.rb +1 -0
  39. data/lib/faml/filter_compilers/cdata.rb +1 -0
  40. data/lib/faml/filter_compilers/coffee.rb +1 -0
  41. data/lib/faml/filter_compilers/css.rb +1 -0
  42. data/lib/faml/filter_compilers/escaped.rb +1 -0
  43. data/lib/faml/filter_compilers/javascript.rb +1 -0
  44. data/lib/faml/filter_compilers/markdown.rb +1 -0
  45. data/lib/faml/filter_compilers/plain.rb +1 -0
  46. data/lib/faml/filter_compilers/preserve.rb +1 -0
  47. data/lib/faml/filter_compilers/ruby.rb +1 -0
  48. data/lib/faml/filter_compilers/sass.rb +1 -0
  49. data/lib/faml/filter_compilers/scss.rb +1 -0
  50. data/lib/faml/filter_compilers/tilt_base.rb +1 -0
  51. data/lib/faml/helpers.rb +1 -0
  52. data/lib/faml/html.rb +1 -0
  53. data/lib/faml/newline.rb +1 -0
  54. data/lib/faml/object_ref.rb +1 -0
  55. data/lib/faml/rails_handler.rb +1 -0
  56. data/lib/faml/rails_helpers.rb +1 -0
  57. data/lib/faml/railtie.rb +1 -0
  58. data/lib/faml/ruby_syntax_checker.rb +1 -0
  59. data/lib/faml/script_end.rb +1 -0
  60. data/lib/faml/static_hash_parser.rb +37 -13
  61. data/lib/faml/stats.rb +1 -0
  62. data/lib/faml/text_compiler.rb +1 -0
  63. data/lib/faml/tilt.rb +1 -0
  64. data/lib/faml/version.rb +2 -1
  65. data/spec/compiler_newline_spec.rb +1 -0
  66. data/spec/rails/app/controllers/application_controller.rb +1 -0
  67. data/spec/rails/app/controllers/books_controller.rb +1 -0
  68. data/spec/rails/app/helpers/application_helper.rb +1 -0
  69. data/spec/rails/app/models/book.rb +1 -0
  70. data/spec/rails/config/application.rb +1 -0
  71. data/spec/rails/config/boot.rb +1 -0
  72. data/spec/rails/config/environment.rb +1 -0
  73. data/spec/rails/config/environments/development.rb +1 -0
  74. data/spec/rails/config/environments/production.rb +1 -0
  75. data/spec/rails/config/environments/test.rb +1 -0
  76. data/spec/rails/config/initializers/assets.rb +1 -0
  77. data/spec/rails/config/initializers/backtrace_silencers.rb +1 -0
  78. data/spec/rails/config/initializers/cookies_serializer.rb +1 -0
  79. data/spec/rails/config/initializers/filter_parameter_logging.rb +1 -0
  80. data/spec/rails/config/initializers/inflections.rb +1 -0
  81. data/spec/rails/config/initializers/mime_types.rb +1 -0
  82. data/spec/rails/config/initializers/secret_key_base.rb +1 -0
  83. data/spec/rails/config/initializers/session_store.rb +1 -0
  84. data/spec/rails/config/initializers/wrap_parameters.rb +1 -0
  85. data/spec/rails/config/routes.rb +1 -0
  86. data/spec/rails/db/seeds.rb +1 -0
  87. data/spec/rails/spec/requests/faml_spec.rb +1 -0
  88. data/spec/rails_helper.rb +1 -0
  89. data/spec/render/attribute_spec.rb +33 -0
  90. data/spec/render/comment_spec.rb +1 -0
  91. data/spec/render/doctype_spec.rb +1 -0
  92. data/spec/render/element_spec.rb +1 -0
  93. data/spec/render/filters/cdata_spec.rb +1 -0
  94. data/spec/render/filters/coffee_spec.rb +1 -0
  95. data/spec/render/filters/css_spec.rb +1 -0
  96. data/spec/render/filters/escaped_spec.rb +1 -0
  97. data/spec/render/filters/javascript_spec.rb +1 -0
  98. data/spec/render/filters/markdown_spec.rb +1 -0
  99. data/spec/render/filters/plain_spec.rb +1 -0
  100. data/spec/render/filters/preserve_spec.rb +1 -0
  101. data/spec/render/filters/ruby_spec.rb +1 -0
  102. data/spec/render/filters/sass_spec.rb +1 -0
  103. data/spec/render/filters/scss_spec.rb +1 -0
  104. data/spec/render/filters_spec.rb +1 -0
  105. data/spec/render/haml_comment_spec.rb +1 -0
  106. data/spec/render/helpers_spec.rb +1 -0
  107. data/spec/render/multiline_spec.rb +1 -0
  108. data/spec/render/newline_spec.rb +1 -0
  109. data/spec/render/plain_spec.rb +1 -0
  110. data/spec/render/preserve_spec.rb +1 -0
  111. data/spec/render/sanitize_spec.rb +1 -0
  112. data/spec/render/script_spec.rb +1 -0
  113. data/spec/render/silent_script_spec.rb +1 -0
  114. data/spec/render/unescape_spec.rb +1 -0
  115. data/spec/spec_helper.rb +1 -0
  116. data/spec/support/incompatibilities_generator.rb +2 -1
  117. data/spec/tilt_spec.rb +1 -0
  118. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a3b36d8389b63138cf89889812b0fd7d4534090
4
- data.tar.gz: fc0f8be17b23d50a7b921a7d8480a81d35d37bfd
3
+ metadata.gz: c8c5abc0e50c774fb988c861370ccbe38c61bace
4
+ data.tar.gz: d56eba69f346d05509da4cbdce6dccbd3d8f8666
5
5
  SHA512:
6
- metadata.gz: 6894952372619bbb11ce192021df6b7640f0d509eee42f315087dc9009b6800f8f7437e519b1d11d3c93ee2d2bc8f86c8b08bd009ad493500400eab3f9ca7a91
7
- data.tar.gz: 19d60336ee8bb7fb09837540de41db71bc3f368e693dcd9d39507aae9888aa49b7523215a2777c1177d178af80434f9448ad607e39280ccd24a992c8a876f38a
6
+ metadata.gz: 5b1d9821bddbb9c89a289a7190ca8af46921e88154c0a2baf6ecef7648d7720437f7a01c4f1166645400e3964843cb91195850bf8cf3132dfb27267cb5cb1f1b
7
+ data.tar.gz: 9a01b8763adad686ff59845d00d31d3fe4cc926ce94f6a034673ecf3b4736a30760e102b26a3b1a61553a5dd6eb9fcde6f976761f5998f2385590871a5042dd3
@@ -1,3 +1,9 @@
1
+ ## 0.6.1 (2015-11-21)
2
+ - Fix handling duplicated old attributes and new attributes
3
+ - https://github.com/eagletmt/faml/pull/37
4
+ - `%span{class: 1}(class: 2)` now renders `<span class='1 2'></span>` . `class` and `id` are correctly merged.
5
+ - `%span{foo: 1}(foo: 2)` now renders `<span foo='1'></span>` . Old attributes has priority over new attributes.
6
+
1
7
  ## 0.6.0 (2015-11-21)
2
8
  - Disable Faml::Helpers by default
3
9
  - https://github.com/eagletmt/faml/pull/35
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen-string-literal: true
2
3
  require 'benchmark/ips'
3
4
  require 'haml'
4
5
  require 'faml'
@@ -1,3 +1,4 @@
1
+ # frozen-string-literal: true
1
2
  class Context
2
3
  def header
3
4
  'Colors'
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen-string-literal: true
2
3
  require 'benchmark/ips'
3
4
  require 'haml'
4
5
  require 'faml'
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen-string-literal: true
2
3
  require 'benchmark/ips'
3
4
  require 'haml'
4
5
  require 'faml'
@@ -1,3 +1,4 @@
1
+ # frozen-string-literal: true
1
2
  require 'mkmf'
2
3
 
3
4
  $CFLAGS << ' -Wall -W'
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
35
35
  spec.add_development_dependency 'rake'
36
36
  spec.add_development_dependency 'rake-compiler'
37
37
  spec.add_development_dependency 'redcarpet'
38
- spec.add_development_dependency 'rspec', '>= 3'
38
+ spec.add_development_dependency 'rspec', '>= 3.3'
39
39
  spec.add_development_dependency 'rubocop'
40
40
  spec.add_development_dependency 'sass'
41
41
  spec.add_development_dependency 'simplecov'
@@ -1,3 +1,4 @@
1
+ # frozen-string-literal: true
1
2
  require 'minitest/autorun'
2
3
  require 'json'
3
4
  require 'faml'
@@ -1,7 +1,7 @@
1
1
  # Incompatibilities
2
2
  ## Versions
3
3
  - Haml 4.0.7
4
- - Faml 0.6.0
4
+ - Faml 0.6.1
5
5
  - Hamlit 1.7.2
6
6
 
7
7
  ## Table of contents
@@ -1,4 +1,4 @@
1
- # [./spec/compiler_newline_spec.rb:209](../../spec/compiler_newline_spec.rb#L209)
1
+ # [./spec/compiler_newline_spec.rb:210](../../spec/compiler_newline_spec.rb#L210)
2
2
  ## Input
3
3
  ```haml
4
4
  = [__LINE__,
@@ -1,4 +1,4 @@
1
- # [./spec/render/attribute_spec.rb:48](../../../spec/render/attribute_spec.rb#L48)
1
+ # [./spec/render/attribute_spec.rb:49](../../../spec/render/attribute_spec.rb#L49)
2
2
  ## Input
3
3
  ```haml
4
4
  - h1 = {class: 'c1', id: ['id1', 'id3']}
@@ -19,7 +19,7 @@
19
19
 
20
20
  ```
21
21
 
22
- # [./spec/render/attribute_spec.rb:61](../../../spec/render/attribute_spec.rb#L61)
22
+ # [./spec/render/attribute_spec.rb:62](../../../spec/render/attribute_spec.rb#L62)
23
23
  ## Input
24
24
  ```haml
25
25
  %span.foo{class: "foo bar"}
@@ -37,7 +37,7 @@
37
37
 
38
38
  ```
39
39
 
40
- # [./spec/render/attribute_spec.rb:67](../../../spec/render/attribute_spec.rb#L67)
40
+ # [./spec/render/attribute_spec.rb:68](../../../spec/render/attribute_spec.rb#L68)
41
41
  ## Input
42
42
  ```haml
43
43
  %span{class: []}
@@ -55,7 +55,7 @@
55
55
 
56
56
  ```
57
57
 
58
- # [./spec/render/attribute_spec.rb:71](../../../spec/render/attribute_spec.rb#L71)
58
+ # [./spec/render/attribute_spec.rb:72](../../../spec/render/attribute_spec.rb#L72)
59
59
  ## Input
60
60
  ```haml
61
61
  %span{class: [1, nil, false, true]}
@@ -73,7 +73,7 @@
73
73
 
74
74
  ```
75
75
 
76
- # [./spec/render/attribute_spec.rb:71](../../../spec/render/attribute_spec.rb#L71)
76
+ # [./spec/render/attribute_spec.rb:72](../../../spec/render/attribute_spec.rb#L72)
77
77
  ## Input
78
78
  ```haml
79
79
  - v = [1, nil, false, true]
@@ -92,7 +92,7 @@
92
92
 
93
93
  ```
94
94
 
95
- # [./spec/render/attribute_spec.rb:71](../../../spec/render/attribute_spec.rb#L71)
95
+ # [./spec/render/attribute_spec.rb:72](../../../spec/render/attribute_spec.rb#L72)
96
96
  ## Input
97
97
  ```haml
98
98
  - h = { class: [1, nil, false, true] }
@@ -111,7 +111,7 @@
111
111
 
112
112
  ```
113
113
 
114
- # [./spec/render/attribute_spec.rb:81](../../../spec/render/attribute_spec.rb#L81)
114
+ # [./spec/render/attribute_spec.rb:82](../../../spec/render/attribute_spec.rb#L82)
115
115
  ## Input
116
116
  ```haml
117
117
  %span{id: []}
@@ -129,7 +129,7 @@
129
129
 
130
130
  ```
131
131
 
132
- # [./spec/render/attribute_spec.rb:85](../../../spec/render/attribute_spec.rb#L85)
132
+ # [./spec/render/attribute_spec.rb:86](../../../spec/render/attribute_spec.rb#L86)
133
133
  ## Input
134
134
  ```haml
135
135
  %span{id: [1, nil, false, true]}
@@ -147,7 +147,7 @@
147
147
 
148
148
  ```
149
149
 
150
- # [./spec/render/attribute_spec.rb:85](../../../spec/render/attribute_spec.rb#L85)
150
+ # [./spec/render/attribute_spec.rb:86](../../../spec/render/attribute_spec.rb#L86)
151
151
  ## Input
152
152
  ```haml
153
153
  - v = [1, nil, false, true]
@@ -166,7 +166,7 @@
166
166
 
167
167
  ```
168
168
 
169
- # [./spec/render/attribute_spec.rb:85](../../../spec/render/attribute_spec.rb#L85)
169
+ # [./spec/render/attribute_spec.rb:86](../../../spec/render/attribute_spec.rb#L86)
170
170
  ## Input
171
171
  ```haml
172
172
  - h = { id: [1, nil, false, true] }
@@ -185,7 +185,7 @@
185
185
 
186
186
  ```
187
187
 
188
- # [./spec/render/attribute_spec.rb:91](../../../spec/render/attribute_spec.rb#L91)
188
+ # [./spec/render/attribute_spec.rb:92](../../../spec/render/attribute_spec.rb#L92)
189
189
  ## Input
190
190
  ```haml
191
191
  %span{class: "x\"y'z"} hello
@@ -203,7 +203,7 @@
203
203
 
204
204
  ```
205
205
 
206
- # [./spec/render/attribute_spec.rb:109](../../../spec/render/attribute_spec.rb#L109)
206
+ # [./spec/render/attribute_spec.rb:110](../../../spec/render/attribute_spec.rb#L110)
207
207
  ## Input (with options={:format=>:xhtml})
208
208
  ```haml
209
209
  - foo = true
@@ -222,7 +222,7 @@
222
222
 
223
223
  ```
224
224
 
225
- # [./spec/render/attribute_spec.rb:109](../../../spec/render/attribute_spec.rb#L109)
225
+ # [./spec/render/attribute_spec.rb:110](../../../spec/render/attribute_spec.rb#L110)
226
226
  ## Input (with options={:format=>:xhtml})
227
227
  ```haml
228
228
  - h = {foo: true, bar: 1}
@@ -241,7 +241,7 @@
241
241
 
242
242
  ```
243
243
 
244
- # [./spec/render/attribute_spec.rb:116](../../../spec/render/attribute_spec.rb#L116)
244
+ # [./spec/render/attribute_spec.rb:117](../../../spec/render/attribute_spec.rb#L117)
245
245
  ## Input
246
246
  ```haml
247
247
  %span{foo: {bar: 1+2}} hello
@@ -259,7 +259,7 @@
259
259
 
260
260
  ```
261
261
 
262
- # [./spec/render/attribute_spec.rb:120](../../../spec/render/attribute_spec.rb#L120)
262
+ # [./spec/render/attribute_spec.rb:121](../../../spec/render/attribute_spec.rb#L121)
263
263
  ## Input
264
264
  ```haml
265
265
  - attrs = { foo: 1, bar: { hoge: :fuga }, baz: true }
@@ -285,7 +285,7 @@
285
285
 
286
286
  ```
287
287
 
288
- # [./spec/render/attribute_spec.rb:134](../../../spec/render/attribute_spec.rb#L134)
288
+ # [./spec/render/attribute_spec.rb:135](../../../spec/render/attribute_spec.rb#L135)
289
289
  ## Input
290
290
  ```haml
291
291
  - data = { foo: 1 }
@@ -305,7 +305,7 @@
305
305
 
306
306
  ```
307
307
 
308
- # [./spec/render/attribute_spec.rb:141](../../../spec/render/attribute_spec.rb#L141)
308
+ # [./spec/render/attribute_spec.rb:142](../../../spec/render/attribute_spec.rb#L142)
309
309
  ## Input
310
310
  ```haml
311
311
  %span{foo: {bar: 1+2}} hello
@@ -323,7 +323,7 @@
323
323
 
324
324
  ```
325
325
 
326
- # [./spec/render/attribute_spec.rb:164](../../../spec/render/attribute_spec.rb#L164)
326
+ # [./spec/render/attribute_spec.rb:165](../../../spec/render/attribute_spec.rb#L165)
327
327
  ## Input
328
328
  ```haml
329
329
  %span{data: {foo: 1, bar: 'baz', :hoge => :fuga, k1: { k2: 'v3' }}} hello
@@ -341,7 +341,7 @@
341
341
 
342
342
  ```
343
343
 
344
- # [./spec/render/attribute_spec.rb:172](../../../spec/render/attribute_spec.rb#L172)
344
+ # [./spec/render/attribute_spec.rb:173](../../../spec/render/attribute_spec.rb#L173)
345
345
  ## Input
346
346
  ```haml
347
347
  %span{data: {foo: 1, bar: 2+3}} hello
@@ -359,7 +359,7 @@
359
359
 
360
360
  ```
361
361
 
362
- # [./spec/render/attribute_spec.rb:176](../../../spec/render/attribute_spec.rb#L176)
362
+ # [./spec/render/attribute_spec.rb:177](../../../spec/render/attribute_spec.rb#L177)
363
363
  ## Input
364
364
  ```haml
365
365
  - data = { foo: 1, bar: 2 }
@@ -379,7 +379,7 @@
379
379
 
380
380
  ```
381
381
 
382
- # [./spec/render/attribute_spec.rb:194](../../../spec/render/attribute_spec.rb#L194)
382
+ # [./spec/render/attribute_spec.rb:195](../../../spec/render/attribute_spec.rb#L195)
383
383
  ## Input
384
384
  ```haml
385
385
  %span{b: __LINE__,
@@ -399,7 +399,7 @@
399
399
 
400
400
  ```
401
401
 
402
- # [./spec/render/attribute_spec.rb:201](../../../spec/render/attribute_spec.rb#L201)
402
+ # [./spec/render/attribute_spec.rb:202](../../../spec/render/attribute_spec.rb#L202)
403
403
  ## Input
404
404
  ```haml
405
405
  %span{"foo\0bar" => "hello"}
@@ -417,7 +417,7 @@
417
417
 
418
418
  ```
419
419
 
420
- # [./spec/render/attribute_spec.rb:201](../../../spec/render/attribute_spec.rb#L201)
420
+ # [./spec/render/attribute_spec.rb:202](../../../spec/render/attribute_spec.rb#L202)
421
421
  ## Input
422
422
  ```haml
423
423
  - val = "hello"
@@ -437,7 +437,7 @@
437
437
 
438
438
  ```
439
439
 
440
- # [./spec/render/attribute_spec.rb:201](../../../spec/render/attribute_spec.rb#L201)
440
+ # [./spec/render/attribute_spec.rb:202](../../../spec/render/attribute_spec.rb#L202)
441
441
  ## Input
442
442
  ```haml
443
443
  - key = "foo\0bar"
@@ -459,7 +459,7 @@
459
459
  ... ^
460
460
  ```
461
461
 
462
- # [./spec/render/attribute_spec.rb:215](../../../spec/render/attribute_spec.rb#L215)
462
+ # [./spec/render/attribute_spec.rb:216](../../../spec/render/attribute_spec.rb#L216)
463
463
  ## Input
464
464
  ```haml
465
465
  %span[Faml::TestStruct.new(123)] hello
@@ -477,7 +477,7 @@
477
477
 
478
478
  ```
479
479
 
480
- # [./spec/render/attribute_spec.rb:219](../../../spec/render/attribute_spec.rb#L219)
480
+ # [./spec/render/attribute_spec.rb:220](../../../spec/render/attribute_spec.rb#L220)
481
481
  ## Input
482
482
  ```haml
483
483
  %span[Faml::TestStruct.new(123), :hello] hello
@@ -495,7 +495,7 @@
495
495
 
496
496
  ```
497
497
 
498
- # [./spec/render/attribute_spec.rb:223](../../../spec/render/attribute_spec.rb#L223)
498
+ # [./spec/render/attribute_spec.rb:224](../../../spec/render/attribute_spec.rb#L224)
499
499
  ## Input
500
500
  ```haml
501
501
  %span[Faml::TestRefStruct.new(123)] hello
@@ -513,7 +513,7 @@
513
513
 
514
514
  ```
515
515
 
516
- # [./spec/render/attribute_spec.rb:227](../../../spec/render/attribute_spec.rb#L227)
516
+ # [./spec/render/attribute_spec.rb:228](../../../spec/render/attribute_spec.rb#L228)
517
517
  ## Input
518
518
  ```haml
519
519
  %span#baz[Faml::TestStruct.new(123)]{id: "foo"} hello
@@ -531,3 +531,289 @@
531
531
 
532
532
  ```
533
533
 
534
+ # [./spec/render/attribute_spec.rb:234](../../../spec/render/attribute_spec.rb#L234)
535
+ ## Input
536
+ ```haml
537
+ %span{foo: 1}(foo=2)
538
+ ```
539
+
540
+ ## Faml, Haml
541
+ ```html
542
+ <span foo='1'></span>
543
+
544
+ ```
545
+
546
+ ## Hamlit
547
+ ```html
548
+ <span foo='1' foo='2'></span>
549
+
550
+ ```
551
+
552
+ # [./spec/render/attribute_spec.rb:234](../../../spec/render/attribute_spec.rb#L234)
553
+ ## Input
554
+ ```haml
555
+ %span(foo=2){foo: 1}
556
+ ```
557
+
558
+ ## Faml, Haml
559
+ ```html
560
+ <span foo='1'></span>
561
+
562
+ ```
563
+
564
+ ## Hamlit
565
+ ```html
566
+ <span foo='2' foo='1'></span>
567
+
568
+ ```
569
+
570
+ # [./spec/render/attribute_spec.rb:234](../../../spec/render/attribute_spec.rb#L234)
571
+ ## Input
572
+ ```haml
573
+ - v = 2
574
+ %span{foo: v-1}(foo=v)
575
+ ```
576
+
577
+ ## Faml, Haml
578
+ ```html
579
+ <span foo='1'></span>
580
+
581
+ ```
582
+
583
+ ## Hamlit
584
+ ```html
585
+ <span foo='1' foo='2'></span>
586
+
587
+ ```
588
+
589
+ # [./spec/render/attribute_spec.rb:234](../../../spec/render/attribute_spec.rb#L234)
590
+ ## Input
591
+ ```haml
592
+ - v = 2
593
+ %span(foo=v){foo: v-1}
594
+ ```
595
+
596
+ ## Faml, Haml
597
+ ```html
598
+ <span foo='1'></span>
599
+
600
+ ```
601
+
602
+ ## Hamlit
603
+ ```html
604
+ <span foo='2' foo='1'></span>
605
+
606
+ ```
607
+
608
+ # [./spec/render/attribute_spec.rb:234](../../../spec/render/attribute_spec.rb#L234)
609
+ ## Input
610
+ ```haml
611
+ - h = {foo: 1}
612
+ %span{h}(foo=2)
613
+ ```
614
+
615
+ ## Faml, Haml
616
+ ```html
617
+ <span foo='1'></span>
618
+
619
+ ```
620
+
621
+ ## Hamlit
622
+ ```html
623
+ <span foo='1' foo='2'></span>
624
+
625
+ ```
626
+
627
+ # [./spec/render/attribute_spec.rb:234](../../../spec/render/attribute_spec.rb#L234)
628
+ ## Input
629
+ ```haml
630
+ - h = {foo: 1}
631
+ %span(foo=2){h}
632
+ ```
633
+
634
+ ## Faml, Haml
635
+ ```html
636
+ <span foo='1'></span>
637
+
638
+ ```
639
+
640
+ ## Hamlit
641
+ ```html
642
+ <span foo='1' foo='2'></span>
643
+
644
+ ```
645
+
646
+ # [./spec/render/attribute_spec.rb:245](../../../spec/render/attribute_spec.rb#L245)
647
+ ## Input
648
+ ```haml
649
+ %span{class: 1}(class=2)
650
+ ```
651
+
652
+ ## Faml, Hamlit
653
+ ```html
654
+ <span class='1 2'></span>
655
+
656
+ ```
657
+
658
+ ## Haml
659
+ ```html
660
+ <span class='1'></span>
661
+
662
+ ```
663
+
664
+ # [./spec/render/attribute_spec.rb:245](../../../spec/render/attribute_spec.rb#L245)
665
+ ## Input
666
+ ```haml
667
+ - v = 2
668
+ %span{class: v-1}(class=v)
669
+ ```
670
+
671
+ ## Faml, Hamlit
672
+ ```html
673
+ <span class='1 2'></span>
674
+
675
+ ```
676
+
677
+ ## Haml
678
+ ```html
679
+ <span class='1'></span>
680
+
681
+ ```
682
+
683
+ # [./spec/render/attribute_spec.rb:245](../../../spec/render/attribute_spec.rb#L245)
684
+ ## Input
685
+ ```haml
686
+ - h = {class: 1}
687
+ %span{h}(class=2)
688
+ ```
689
+
690
+ ## Faml, Hamlit
691
+ ```html
692
+ <span class='1 2'></span>
693
+
694
+ ```
695
+
696
+ ## Haml
697
+ ```html
698
+ <span class='1'></span>
699
+
700
+ ```
701
+
702
+ # [./spec/render/attribute_spec.rb:253](../../../spec/render/attribute_spec.rb#L253)
703
+ ## Input
704
+ ```haml
705
+ %span{id: 1}(id=2)
706
+ ```
707
+
708
+ ## Faml
709
+ ```html
710
+ <span id='2_1'></span>
711
+
712
+ ```
713
+
714
+ ## Haml
715
+ ```html
716
+ <span id='1'></span>
717
+
718
+ ```
719
+
720
+ ## Hamlit
721
+ ```html
722
+ <span id='1_2'></span>
723
+
724
+ ```
725
+
726
+ # [./spec/render/attribute_spec.rb:253](../../../spec/render/attribute_spec.rb#L253)
727
+ ## Input
728
+ ```haml
729
+ %span(id=2){id: 1}
730
+ ```
731
+
732
+ ## Faml, Hamlit
733
+ ```html
734
+ <span id='2_1'></span>
735
+
736
+ ```
737
+
738
+ ## Haml
739
+ ```html
740
+ <span id='1'></span>
741
+
742
+ ```
743
+
744
+ # [./spec/render/attribute_spec.rb:253](../../../spec/render/attribute_spec.rb#L253)
745
+ ## Input
746
+ ```haml
747
+ - v = 2
748
+ %span{id: v-1}(id=v)
749
+ ```
750
+
751
+ ## Faml, Hamlit
752
+ ```html
753
+ <span id='2_1'></span>
754
+
755
+ ```
756
+
757
+ ## Haml
758
+ ```html
759
+ <span id='1'></span>
760
+
761
+ ```
762
+
763
+ # [./spec/render/attribute_spec.rb:253](../../../spec/render/attribute_spec.rb#L253)
764
+ ## Input
765
+ ```haml
766
+ - v = 2
767
+ %span(id=v){id: v-1}
768
+ ```
769
+
770
+ ## Faml, Hamlit
771
+ ```html
772
+ <span id='2_1'></span>
773
+
774
+ ```
775
+
776
+ ## Haml
777
+ ```html
778
+ <span id='1'></span>
779
+
780
+ ```
781
+
782
+ # [./spec/render/attribute_spec.rb:253](../../../spec/render/attribute_spec.rb#L253)
783
+ ## Input
784
+ ```haml
785
+ - h = {id: 1}
786
+ %span{h}(id=2)
787
+ ```
788
+
789
+ ## Faml, Hamlit
790
+ ```html
791
+ <span id='2_1'></span>
792
+
793
+ ```
794
+
795
+ ## Haml
796
+ ```html
797
+ <span id='1'></span>
798
+
799
+ ```
800
+
801
+ # [./spec/render/attribute_spec.rb:253](../../../spec/render/attribute_spec.rb#L253)
802
+ ## Input
803
+ ```haml
804
+ - h = {id: 1}
805
+ %span(id=2){h}
806
+ ```
807
+
808
+ ## Faml, Hamlit
809
+ ```html
810
+ <span id='2_1'></span>
811
+
812
+ ```
813
+
814
+ ## Haml
815
+ ```html
816
+ <span id='1'></span>
817
+
818
+ ```
819
+