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 +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/haml/filters/erb.rb +1 -1
- data/lib/haml/filters/tilt_base.rb +11 -1
- data/lib/haml/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44554f3aa7da10cf2fe950258a176343ad27560a0569b722543640e81eb61fb7
|
4
|
+
data.tar.gz: 9f43b1fcb6441016d93dbb0f2800d2bb54e645882468e20f2d69a1fefdc41e20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
data/lib/haml/filters/erb.rb
CHANGED
@@ -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.
|
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
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.
|
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
|
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
|