haml 6.0.8-java → 6.0.10-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01a86624d7d9895e643653201ad1037e85e87d9548a23afb43513753064b9f58
4
- data.tar.gz: e8ea717795a781b4a4553b37727eb741844c69a80b67a5bff7ad478d068fdcfe
3
+ metadata.gz: 44554f3aa7da10cf2fe950258a176343ad27560a0569b722543640e81eb61fb7
4
+ data.tar.gz: 9f43b1fcb6441016d93dbb0f2800d2bb54e645882468e20f2d69a1fefdc41e20
5
5
  SHA512:
6
- metadata.gz: eb1195a84e4a2469ca99c7137dc1aa58e8a91cac275c3c17fad82a7bfe82a218765147b8504a13261438c1515840087dc712e30116e92b7760f72f3c7424ba56
7
- data.tar.gz: b362361d2176778e5c85ea597395da7949ed744c925340002c5f695611d3b8d98924da8fd6d37ebfed71a9f02494939c2af7f2a8cebde95a378df269574786da
6
+ metadata.gz: 808daff72a629634ff341be63fd4dde6a99c3e782004d9118a53f043cfd358fd1cf54ab3319780e9e247f38288b5be5b0cd551a1f0fbbd070360858c5823dc54
7
+ data.tar.gz: 3c4789806d1386544a5fb17e56b396ce77da1f65582a824dde1c2b2c9940c7fd50e64dcbeadccfdfbdc54dc7f3c2f344b1fe3b1474b75d86e1bbaa88011e18f4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Haml Changelog
2
2
 
3
+ ## 6.0.10
4
+
5
+ * Evaluate :erb filter in the template context
6
+
7
+ ## 6.0.9
8
+
9
+ * Support sass-embedded [#1112](https://github.com/haml/haml/issues/1112)
10
+
3
11
  ## 6.0.8
4
12
 
5
13
  * Support interpolation in HTML comments, which has not been working since 6.0.0
@@ -63,6 +71,8 @@ Released on September 21, 2022
63
71
  * The parser is kept as is, but everything else is replaced.
64
72
  * The `haml` CLI interface was also replaced.
65
73
  * The interface of `Haml::Engine` is changed. `Haml::Template` is most likely what you need now.
74
+ * before: `Haml::Engine.new("%p Haml code!").render`
75
+ * after: `Haml::Template.new { "%p Haml code!" }.render`
66
76
  * Most Haml helpers are removed.
67
77
  * Rails:
68
78
  * Kept: `find_and_reserve`, `preserve`, `surround`, `precede`, `succeed`, `capture_haml`
@@ -78,6 +88,8 @@ Released on September 21, 2022
78
88
  `defer`, `disabled`, `download`, `formnovalidate`, `hidden`, `inert`, `ismap`, `itemscope`, `loop`,
79
89
  `multiple`, `muted`, `novalidate`, `open`, `pubdate`, `readonly`, `required`, `reversed`, `scoped`,
80
90
  `seamless`, `selected`, `sortable`, `truespeed`, `typemustmatch`
91
+ * Only `data` and `aria` attributes support using a nested Hash to render hyphenated attributes, e.g.
92
+ `data: { foo: 'bar' }` becomes `data-foo="bar"`, but this no longer works for non-`data`/`aria` attributes.
81
93
  * Some legacy Rails integration is removed.
82
94
  * The default value of `escape_html` option became true.
83
95
  * `-` script lines no longer support capturing. Only `=` lines are supported to yield a nested block.
@@ -3,7 +3,7 @@ module Haml
3
3
  class Filters
4
4
  class Erb < TiltBase
5
5
  def compile(node)
6
- compile_with_tilt(node, 'erb')
6
+ precompiled_with_tilt(node, 'erb')
7
7
  end
8
8
  end
9
9
  end
@@ -7,7 +7,11 @@ module Haml
7
7
  def self.render(name, source, indent_width: 0)
8
8
  text = ::Tilt["t.#{name}"].new { source }.render
9
9
  return text if indent_width == 0
10
- text.gsub!(/^/, ' ' * indent_width)
10
+ if text.frozen?
11
+ text.gsub(/^/, ' ' * indent_width)
12
+ else
13
+ text.gsub!(/^/, ' ' * indent_width)
14
+ end
11
15
  end
12
16
 
13
17
  def explicit_require?(needed_registration)
@@ -17,6 +21,12 @@ module Haml
17
21
 
18
22
  private
19
23
 
24
+ # TODO: support interpolation
25
+ def precompiled_with_tilt(node, name)
26
+ src = ::Tilt["t.#{name}"].new { node.value[:text] }.send(:precompiled, {}).first
27
+ [:dynamic, src]
28
+ end
29
+
20
30
  def compile_with_tilt(node, name, indent_width: 0)
21
31
  if ::Haml::Util.contains_interpolation?(node.value[:text])
22
32
  dynamic_compile(node, name, indent_width: indent_width)
data/lib/haml/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Haml
3
- VERSION = '6.0.8'
3
+ VERSION = '6.0.10'
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.0.8
4
+ version: 6.0.10
5
5
  platform: java
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: 2022-10-29 00:00:00.000000000 Z
15
+ date: 2022-11-10 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  requirement: !ruby/object:Gem::Requirement