haml 6.0.6-java → 6.0.8-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: c35af30ae30b1cb93222b654b157683cb06f6ba5255c5bfb882712d8eba32f12
4
- data.tar.gz: 573262ec4e66e62d2f65707668f1b336c4a9562c4b50ead53033c1f3b8a3ca0d
3
+ metadata.gz: 01a86624d7d9895e643653201ad1037e85e87d9548a23afb43513753064b9f58
4
+ data.tar.gz: e8ea717795a781b4a4553b37727eb741844c69a80b67a5bff7ad478d068fdcfe
5
5
  SHA512:
6
- metadata.gz: 56407b25cd5595d23a200f47397bae209649f0d410a14e354676b74d07c737666aba0141ff1fd87e663f126b94aaa14dd1d14c6de6f89af6c7bdc7153f281d3c
7
- data.tar.gz: bd3aea771399867bba9228390a1969868fea6c58468b4b6f618c1ce488f97fea1448f7b8d5f24fd849c3bfe232a6641b7a23ee59309c5f986833e4943ac9391c
6
+ metadata.gz: eb1195a84e4a2469ca99c7137dc1aa58e8a91cac275c3c17fad82a7bfe82a218765147b8504a13261438c1515840087dc712e30116e92b7760f72f3c7424ba56
7
+ data.tar.gz: b362361d2176778e5c85ea597395da7949ed744c925340002c5f695611d3b8d98924da8fd6d37ebfed71a9f02494939c2af7f2a8cebde95a378df269574786da
@@ -25,16 +25,10 @@ jobs:
25
25
  - truffleruby-head
26
26
  steps:
27
27
  - uses: actions/checkout@v2
28
+ - run: sudo apt-get update && sudo apt-get install -y nodejs libxslt-dev # nodejs for execjs, libxslt for TruffleRuby nokogiri
28
29
  - name: Set up Ruby
29
30
  uses: ruby/setup-ruby@v1
30
31
  with:
31
32
  ruby-version: ${{ matrix.ruby }}
32
- - uses: actions/cache@v2
33
- with:
34
- path: vendor/bundle
35
- key: ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles('**/Gemfile.lock') }}
36
- restore-keys: ${{ runner.os }}-gems-
37
- - run: sudo apt-get update && sudo apt-get install -y nodejs libxslt-dev # nodejs for execjs, libxslt for TruffleRuby nokogiri
38
- - name: bundle install
39
- run: bundle config path vendor/bundle && bundle install -j$(nproc) --retry 3
33
+ bundler-cache: true
40
34
  - run: bundle exec rake test
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Haml Changelog
2
2
 
3
+ ## 6.0.8
4
+
5
+ * Support interpolation in HTML comments, which has not been working since 6.0.0
6
+ [#1107](https://github.com/haml/haml/issues/1107)
7
+
8
+ ## 6.0.7
9
+
10
+ * `Haml::Engine` and `Haml::Template` use StringBuffer instead of ArrayBuffer
11
+ * It seems more performant in many cases with recent Ruby versions.
12
+ * `Haml::RailsTemplate` is not affected.
13
+
3
14
  ## 6.0.6
4
15
 
5
16
  * Prevent CRuby from accidentally using the Ruby implementation fallback
@@ -62,9 +73,16 @@ Released on September 21, 2022
62
73
  * Removed: `block_is_haml?`, `capture_haml`, `escape_once`, `find_and_preserve`, `flatten`, `haml_concat`,
63
74
  `haml_indent`, `haml_tag`, `haml_tag_if`, `html_attrs`, `html_escape`, `init_haml_helpers`, `is_haml?`,
64
75
  `list_of`, `non_haml`, `precede`, `succeed`, `surround`, `tab_down`, `tab_up`, `with_tabs`
65
- * Only the attributes in [`Haml::AttributeBuilder::BOOLEAN_ATTRIBUTES`](lib/haml/attribute_builder.rb)
66
- are handled as boolean attributes.
76
+ * Only the following attributes and `aria`/`data` attributes are considered boolean attributes:
77
+ * `allowfullscreen`, `async`, `autobuffer`, `autofocus`, `autoplay`, `checked`, `controls`, `default`,
78
+ `defer`, `disabled`, `download`, `formnovalidate`, `hidden`, `inert`, `ismap`, `itemscope`, `loop`,
79
+ `multiple`, `muted`, `novalidate`, `open`, `pubdate`, `readonly`, `required`, `reversed`, `scoped`,
80
+ `seamless`, `selected`, `sortable`, `truespeed`, `typemustmatch`
67
81
  * Some legacy Rails integration is removed.
82
+ * The default value of `escape_html` option became true.
83
+ * `-` script lines no longer support capturing. Only `=` lines are supported to yield a nested block.
84
+ * Overriding `data` attributes with another falsy `data-*` attribute that has the same name
85
+ is no longer supported. [#1105](https://github.com/haml/haml/issues/1105)
68
86
 
69
87
  ## 5.2.2
70
88
 
@@ -14,7 +14,7 @@ module Haml
14
14
 
15
15
  def compile_html_comment(node, &block)
16
16
  if node.children.empty?
17
- [:html, :comment, [:static, " #{node.value[:text]} "]]
17
+ [:html, :comment, compile_text(node)]
18
18
  else
19
19
  [:html, :comment, yield(node)]
20
20
  end
@@ -28,12 +28,24 @@ module Haml
28
28
 
29
29
  content =
30
30
  if node.children.empty?
31
- [:static, " #{node.value[:text]} "]
31
+ compile_text(node)
32
32
  else
33
33
  yield(node)
34
34
  end
35
35
  [:html, :condcomment, condition, content, node.value[:revealed]]
36
36
  end
37
+
38
+ def compile_text(node)
39
+ text =
40
+ if node.value[:parse]
41
+ # Just always escaping the result for safety. We could respect
42
+ # escape_html, but I don't see any use case for it.
43
+ [:escape, true, [:dynamic, node.value[:text]]]
44
+ else
45
+ [:static, node.value[:text]]
46
+ end
47
+ [:multi, [:static, ' '], text, [:static, ' ']]
48
+ end
37
49
  end
38
50
  end
39
51
  end
data/lib/haml/engine.rb CHANGED
@@ -13,7 +13,7 @@ module Haml
13
13
  class Engine < Temple::Engine
14
14
  define_options(
15
15
  :buffer_class,
16
- generator: Temple::Generators::ArrayBuffer,
16
+ generator: Temple::Generators::StringBuffer,
17
17
  format: :html,
18
18
  attr_quote: "'",
19
19
  escape_html: true,
data/lib/haml/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Haml
3
- VERSION = '6.0.6'
3
+ VERSION = '6.0.8'
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.6
4
+ version: 6.0.8
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-09 00:00:00.000000000 Z
15
+ date: 2022-10-29 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  requirement: !ruby/object:Gem::Requirement