haml 6.2.0 → 6.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1374065239926b78aa88c8a9669a4a97ea937ba078f4794be6d3d34c072472e
4
- data.tar.gz: a99b6d11b903d2d9985e6e89d857b24c4ca5c31efe2a0c09d29cfea7b58a2057
3
+ metadata.gz: 28980224aeb7aaf767631d85d1a25371bd1e1fd78b87afa34ba5e300ee397126
4
+ data.tar.gz: c6e6cf4c766238cf501eb7695d75bc973746010a0c11bc90bce88d51d3d6b20d
5
5
  SHA512:
6
- metadata.gz: '05423907d445d38fbba24d1b08f6812b43a8bca544554b5ecc1d1190e87842cedf888cd4759f6d568cb861a0f6983e06610d57daa2233feafb0e29cce92c71b1'
7
- data.tar.gz: e88712e3391749f5c893512eb595c912718476a7128773b4edd4aa19b191837ff3d6d154a18a0c8a42a107d6c04ce4ee6cd3189d6270210d9b4b5ded33def0dc
6
+ metadata.gz: 42427402b30e767c124156562de33826ba7e16905a71ee38d494182bb0bd2f7f29135c1fd736702932ca656b94d3fdf8503e5829bd1d4cf62928eb3703261123
7
+ data.tar.gz: a8786a46da773e42d90bca9c29a9003a07be1a0b0f4ef2ad8ce7af117566ea96e891bc13ec22ccb5ab3ad0b6c62be8f247c7ac5b9db279c2f21cd0e4b3d06576
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Haml Changelog
2
2
 
3
+ ## 6.2.1
4
+
5
+ * Fix v6.2.0's bug in rendering dynamic `aria` attributes [#1149](https://github.com/haml/haml/issues/1149)
6
+
3
7
  ## 6.2.0
4
8
 
5
9
  * Drop the C extension [#1146](https://github.com/haml/haml/issues/1146)
@@ -1448,7 +1452,7 @@ Haml 2.2 introduces a new syntax for attributes
1448
1452
  based on the HTML syntax.
1449
1453
  For example:
1450
1454
 
1451
- %a(href="http://haml.info" title="Haml's so cool!")
1455
+ %a(href="https://haml.info" title="Haml's so cool!")
1452
1456
  %img(src="/images/haml.png" alt="Haml")
1453
1457
 
1454
1458
  There are two main reasons for this.
data/FAQ.md CHANGED
@@ -141,7 +141,7 @@ For other plugins, a little searching will probably turn up a way to fix them as
141
141
 
142
142
  ## You still haven't answered my question!
143
143
 
144
- Sorry! Try looking at the [Haml](http://haml.info/docs/yardoc/file.REFERENCE.html) reference,
144
+ Sorry! Try looking at the [Haml](https://haml.info/docs/yardoc/file.REFERENCE.html) reference,
145
145
  If you can't find an answer there,
146
146
  feel free to ask in `#haml` on irc.freenode.net
147
147
  or send an email to the [mailing list](http://groups.google.com/group/haml).
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Haml
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/haml.svg)](http://rubygems.org/gems/haml)
3
+ [![Gem Version](https://badge.fury.io/rb/haml.svg)](https://rubygems.org/gems/haml)
4
4
  [![test](https://github.com/haml/haml/actions/workflows/test.yml/badge.svg)](https://github.com/haml/haml/actions/workflows/test.yml)
5
5
  [![Code Climate](https://codeclimate.com/github/haml/haml/badges/gpa.svg)](https://codeclimate.com/github/haml/haml)
6
6
  [![Inline docs](https://inch-ci.org/github/haml/haml.svg)](https://inch-ci.org/github/haml/haml)
@@ -31,7 +31,7 @@ to compile it to HTML. For more information on these commands, check out
31
31
  haml --help
32
32
  ~~~
33
33
 
34
- To use Haml programmatically, check out the [YARD documentation](http://haml.info/docs/yardoc/).
34
+ To use Haml programmatically, check out the [YARD documentation](https://haml.info/docs/yardoc/).
35
35
 
36
36
  ## Using Haml with Rails
37
37
 
@@ -120,7 +120,7 @@ output the result. You can even use control statements like `if` and `while`:
120
120
  ~~~
121
121
 
122
122
  Haml provides far more tools than those presented here. Check out the [reference
123
- documentation](http://haml.info/docs/yardoc/file.REFERENCE.html)
123
+ documentation](https://haml.info/docs/yardoc/file.REFERENCE.html)
124
124
  for full details.
125
125
 
126
126
  ### Indentation
@@ -132,7 +132,7 @@ can't be mixed, and the same number of tabs or spaces must be used throughout.
132
132
  ## Contributing
133
133
 
134
134
  Contributions are welcomed, but before you get started please read the
135
- [guidelines](http://haml.info/development.html#contributing).
135
+ [guidelines](https://haml.info/development.html#contributing).
136
136
 
137
137
  After forking and then cloning the repo locally, install Bundler and then use it
138
138
  to install the development gem dependencies:
@@ -182,7 +182,7 @@ but still consults on language issues.
182
182
  [Natalie Weizenbaum](http://nex-3.com) was for many years the primary developer
183
183
  and architect of the "modern" Ruby implementation of Haml.
184
184
 
185
- [Norman Clarke](http://github.com/norman) was the primary maintainer of Haml from 2012 to 2016.
185
+ [Norman Clarke](https://github.com/norman) was the primary maintainer of Haml from 2012 to 2016.
186
186
 
187
187
  ## License
188
188
 
data/REFERENCE.md CHANGED
@@ -1200,40 +1200,36 @@ You can also define your own filters.
1200
1200
 
1201
1201
  The simplest example of a filter might be something like:
1202
1202
 
1203
- ```ruby
1204
- class HelloFilter < Haml::Filters::Base
1205
- def compile(_node)
1206
- [:static, "hello world"]
1207
- end
1208
- end
1209
-
1210
- Haml::Filters.registered[:hello] ||= HelloFilter
1211
- ```
1203
+ class HelloFilter < Haml::Filters::Base
1204
+ def compile(_node)
1205
+ [:static, "hello world"]
1206
+ end
1207
+ end
1208
+
1209
+ Haml::Filters.registered[:hello] ||= HelloFilter
1212
1210
 
1213
1211
  A more complex example:
1214
1212
 
1215
- ```ruby
1216
- class BetterFilter < Haml::Filters::Base
1217
- def compile(node)
1218
- temple = [:multi]
1219
- temple << [:static, "hello "]
1220
- temple << compile_text(node.value[:text])
1221
- temple << [:static, " world"]
1222
- temple
1223
- end
1224
-
1225
- private
1226
- def compile_text(text)
1227
- if ::Haml::Util.contains_interpolation?(text)
1228
- [:dynamic, ::Haml::Util.unescape_interpolation(text)]
1229
- else
1230
- [:static, text]
1213
+ class BetterFilter < Haml::Filters::Base
1214
+ def compile(node)
1215
+ temple = [:multi]
1216
+ temple << [:static, "hello "]
1217
+ temple << compile_text(node.value[:text])
1218
+ temple << [:static, " world"]
1219
+ temple
1220
+ end
1221
+
1222
+ private
1223
+ def compile_text(text)
1224
+ if ::Haml::Util.contains_interpolation?(text)
1225
+ [:dynamic, ::Haml::Util.unescape_interpolation(text)]
1226
+ else
1227
+ [:static, text]
1228
+ end
1229
+ end
1231
1230
  end
1232
- end
1233
- end
1234
1231
 
1235
- Haml::Filters.registered[:better] ||= BetterFilter
1236
- ```
1232
+ Haml::Filters.registered[:better] ||= BetterFilter
1237
1233
 
1238
1234
  See {Haml::Filters} for examples.
1239
1235
 
@@ -18,12 +18,14 @@ module Haml::AttributeBuilder
18
18
  keys = hash.keys.sort!
19
19
  keys.each do |key|
20
20
  case key
21
- when 'id'.freeze
21
+ when 'id'
22
22
  buf << " id=#{quote}#{build_id(escape_attrs, *hash[key])}#{quote}"
23
- when 'class'.freeze
23
+ when 'class'
24
24
  buf << " class=#{quote}#{build_class(escape_attrs, *hash[key])}#{quote}"
25
- when 'data'.freeze
25
+ when 'data'
26
26
  buf << build_data(escape_attrs, quote, *hash[key])
27
+ when 'aria'
28
+ buf << build_aria(escape_attrs, quote, *hash[key])
27
29
  when *boolean_attributes, /\Adata-/
28
30
  build_boolean!(escape_attrs, quote, format, buf, key, hash[key])
29
31
  else
@@ -129,7 +131,7 @@ module Haml::AttributeBuilder
129
131
  hash.each do |key, value|
130
132
  key = key.to_s
131
133
  case key
132
- when 'id'.freeze, 'class'.freeze, 'data'.freeze
134
+ when 'id', 'class', 'data', 'aria'
133
135
  merged[key] ||= []
134
136
  merged[key] << value
135
137
  else
data/lib/haml/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Haml
3
- VERSION = '6.2.0'
3
+ VERSION = '6.2.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.0
4
+ version: 6.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Natalie Weizenbaum
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: exe
14
14
  cert_chain: []
15
- date: 2023-09-27 00:00:00.000000000 Z
15
+ date: 2023-10-04 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: temple