haml 6.3.1 → 6.4.0

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: 7fe81126a81cb26d93f23c930d55244ee89654bdfc188f8cf3e64b69475b5472
4
- data.tar.gz: 7862cc5427e62e96ec1851f6265522b619d5f2fdf15a55ca6aef8ee2f641b0ed
3
+ metadata.gz: 313ffec5cc79d2b238173fde9769ac60d26b54bf15d3deda68adc84d0849620b
4
+ data.tar.gz: 143e9115612a2555a4ce34c817745e330548a7eaedf98bc819ead44b2156f8ad
5
5
  SHA512:
6
- metadata.gz: ccf3c62f1b319265ceaec6987888b17f0a2b1599d56e3f625d973ecc3c920b7efbd17e86a949c9081e82b084f554978e52c91d0452e8ef02c6e21d6d4a4e6d0e
7
- data.tar.gz: 01f7a62d43f8a9929bfc42dfb8677f0641650064565c4a2f0ea6fe53a3e11da819b6f9c5c6aa79f67102a0b0197cd282feebcb9116d6bf1f242efc241f7e37f3
6
+ metadata.gz: 117f3811b514f8abd4142cdc8022e282e5a5434c5c0f6904e7eaff7655f58894e3486c999282f0140b6011016b52b139036071792c3ba33494de73342d512d77
7
+ data.tar.gz: 99e76cc2438c8ba70aaf39b3ccc0df9b610e3ac06de35b8865c2f2ce5aa692f9642791b863602eef5e382d60224fdb44a143074c11f072ccad7556ae1461b261
@@ -27,7 +27,7 @@ jobs:
27
27
  - '3.4'
28
28
  - ruby-head
29
29
  - jruby
30
- - truffleruby-head
30
+ - truffleruby
31
31
  steps:
32
32
  - uses: actions/checkout@v4
33
33
  - run: sudo apt-get update && sudo apt-get install -y nodejs libxslt-dev # nodejs for execjs, libxslt for TruffleRuby nokogiri
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Haml Changelog
2
2
 
3
+ ## 6.4.0
4
+
5
+ * Authorize characters in attribute name for vuejs https://github.com/haml/haml/pull/1172
6
+ * Compile new-style attributes statically https://github.com/haml/haml/pull/1165
7
+ * Remove newlines from template annotation comments https://github.com/haml/haml/pull/1186
8
+ * Fix line numbers within a :ruby filter https://github.com/haml/haml/pull/1166
9
+ * Fix .class + nested class array bug https://github.com/haml/haml/pull/1191
10
+
3
11
  ## 6.3.1
4
12
 
5
13
  * Optimize string transformation using `String#tr` https://github.com/haml/haml/pull/1168
data/REFERENCE.md CHANGED
@@ -360,13 +360,6 @@ will render as:
360
360
 
361
361
  <a data-author-id='123' data-category='7' href='/posts'>Posts By Author</a>
362
362
 
363
- Notice that the underscore in `author_id` was replaced with a hyphen. If you wish
364
- to suppress this behavior, you can set Haml's
365
- {Haml::Options#hyphenate_data_attrs `:hyphenate_data_attrs` option} to `false`,
366
- and the output will be rendered as:
367
-
368
- <a data-author_id='123' data-category='7' href='/posts'>Posts By Author</a>
369
-
370
363
  This expansion of hashes is recursive – any value of the child hash that is
371
364
  itself a hash will create an attribute for each entry, with the attribute name
372
365
  prefixed with all ancestor keys. For example:
@@ -54,7 +54,7 @@ module Haml::AttributeBuilder
54
54
  when value.is_a?(String)
55
55
  classes += value.split(' ')
56
56
  when value.is_a?(Array)
57
- classes += value.select { |v| v }
57
+ classes += value.flatten.select { |v| v }
58
58
  when value
59
59
  classes << value.to_s
60
60
  end
@@ -98,7 +98,7 @@ module Haml
98
98
  def compile_boolean!(temple, key, values)
99
99
  exp = literal_for(values.last)
100
100
 
101
- if Temple::StaticAnalyzer.static?(exp)
101
+ if values.last.first == :static || Temple::StaticAnalyzer.static?(exp)
102
102
  value = eval(exp)
103
103
  case value
104
104
  when true then temple << [:html, :attr, key, @format == :xhtml ? [:static, key] : [:multi]]
@@ -7,7 +7,7 @@ module Haml
7
7
  def compile(node)
8
8
  text = node.value[:text]
9
9
  text = text.rstrip unless ::Haml::Util.contains_interpolation?(text) # for compatibility
10
- [:multi, *compile_plain(text)]
10
+ [:multi, [:newline], *compile_plain(text)]
11
11
  end
12
12
 
13
13
  private
@@ -3,7 +3,7 @@ module Haml
3
3
  class Filters
4
4
  class Ruby < Base
5
5
  def compile(node)
6
- [:code, node.value[:text]]
6
+ [:multi, [:newline], [:code, node.value[:text]]]
7
7
  end
8
8
  end
9
9
  end
data/lib/haml/parser.rb CHANGED
@@ -749,7 +749,7 @@ module Haml
749
749
  end
750
750
 
751
751
  def parse_new_attribute(scanner)
752
- unless (name = scanner.scan(/[-:\w]+/))
752
+ unless (name = scanner.scan(/[-:@#\w\.]+/))
753
753
  return if scanner.scan(/\)/)
754
754
  return false
755
755
  end
@@ -40,8 +40,8 @@ module Haml
40
40
 
41
41
  if ActionView::Base.try(:annotate_rendered_view_with_filenames) && template.format == :html
42
42
  options = options.merge(
43
- preamble: "<!-- BEGIN #{template.short_identifier} -->\n",
44
- postamble: "<!-- END #{template.short_identifier} -->\n",
43
+ preamble: "<!-- BEGIN #{template.short_identifier} -->",
44
+ postamble: "<!-- END #{template.short_identifier} -->",
45
45
  )
46
46
  end
47
47
 
data/lib/haml/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Haml
3
- VERSION = '6.3.1'
3
+ VERSION = '6.4.0'
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.3.1
4
+ version: 6.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Natalie Weizenbaum