haml 6.3.1 → 7.0.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 +4 -4
- data/.github/workflows/test.yml +1 -6
- data/CHANGELOG.md +13 -0
- data/Gemfile +3 -1
- data/REFERENCE.md +0 -7
- data/bin/console +3 -4
- data/haml.gemspec +1 -2
- data/lib/haml/attribute_builder.rb +1 -1
- data/lib/haml/attribute_compiler.rb +1 -1
- data/lib/haml/engine.rb +2 -2
- data/lib/haml/filters/plain.rb +1 -1
- data/lib/haml/filters/ruby.rb +1 -1
- data/lib/haml/parser.rb +1 -1
- data/lib/haml/rails_template.rb +2 -2
- data/lib/haml/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0e24d15b93f8a8d9f856080c6fd6dbb2183b07602b2e3bd9beb43a718b4cd021
|
|
4
|
+
data.tar.gz: 5cc2496f9fdeba6950f152ffb0be8ea690f6543736d178e98da276da28706b4c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 379fe2253bfe6688e41fdd16a8b007635ca3a48c688d5ba3e90ccafe4f8414959c1e800481a95fd76995615bd9af66977e74f0d4a08916ab1ff257bd7b375fbd
|
|
7
|
+
data.tar.gz: bdcecfe1f128e52e719d0005abddeb4a5fb4b049722c5db267bf1862ce54ddb69db18a7114a1e37b8db880676b513cbd8dc4d9fa02da23d5de66d4bbaa282338
|
data/.github/workflows/test.yml
CHANGED
|
@@ -17,17 +17,12 @@ jobs:
|
|
|
17
17
|
fail-fast: false
|
|
18
18
|
matrix:
|
|
19
19
|
ruby:
|
|
20
|
-
- '2.5'
|
|
21
|
-
- '2.6'
|
|
22
|
-
- '2.7'
|
|
23
|
-
- '3.0'
|
|
24
|
-
- '3.1'
|
|
25
20
|
- '3.2'
|
|
26
21
|
- '3.3'
|
|
27
22
|
- '3.4'
|
|
28
23
|
- ruby-head
|
|
29
24
|
- jruby
|
|
30
|
-
- truffleruby
|
|
25
|
+
- truffleruby
|
|
31
26
|
steps:
|
|
32
27
|
- uses: actions/checkout@v4
|
|
33
28
|
- 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,18 @@
|
|
|
1
1
|
# Haml Changelog
|
|
2
2
|
|
|
3
|
+
## 7.0.0
|
|
4
|
+
|
|
5
|
+
* Change the default `attr_quote` from `'` to `"` https://github.com/haml/haml/issues/1188
|
|
6
|
+
* Bump required Ruby version to 3.2 https://github.com/haml/haml/issues/1176
|
|
7
|
+
|
|
8
|
+
## 6.4.0
|
|
9
|
+
|
|
10
|
+
* Authorize characters in attribute name for vuejs https://github.com/haml/haml/pull/1172
|
|
11
|
+
* Compile new-style attributes statically https://github.com/haml/haml/pull/1165
|
|
12
|
+
* Remove newlines from template annotation comments https://github.com/haml/haml/pull/1186
|
|
13
|
+
* Fix line numbers within a :ruby filter https://github.com/haml/haml/pull/1166
|
|
14
|
+
* Fix .class + nested class array bug https://github.com/haml/haml/pull/1191
|
|
15
|
+
|
|
3
16
|
## 6.3.1
|
|
4
17
|
|
|
5
18
|
* Optimize string transformation using `String#tr` https://github.com/haml/haml/pull/1168
|
data/Gemfile
CHANGED
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:
|
data/bin/console
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
require 'bundler/setup'
|
|
4
|
-
require '
|
|
4
|
+
require 'haml'
|
|
5
5
|
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Pry.start
|
|
9
|
+
require 'irb'
|
|
10
|
+
IRB.start
|
data/haml.gemspec
CHANGED
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
|
23
23
|
|
|
24
24
|
spec.metadata["changelog_uri"] = spec.homepage + "/blob/main/CHANGELOG.md"
|
|
25
25
|
|
|
26
|
-
spec.required_ruby_version = '>= 2.
|
|
26
|
+
spec.required_ruby_version = '>= 3.2.0'
|
|
27
27
|
|
|
28
28
|
spec.add_dependency 'temple', '>= 0.8.2'
|
|
29
29
|
spec.add_dependency 'thor'
|
|
@@ -33,7 +33,6 @@ Gem::Specification.new do |spec|
|
|
|
33
33
|
spec.add_development_dependency 'bundler'
|
|
34
34
|
spec.add_development_dependency 'coffee-script'
|
|
35
35
|
spec.add_development_dependency 'erubi'
|
|
36
|
-
spec.add_development_dependency 'haml', '>= 5'
|
|
37
36
|
spec.add_development_dependency 'less'
|
|
38
37
|
spec.add_development_dependency 'minitest-reporters', '~> 1.1'
|
|
39
38
|
spec.add_development_dependency 'rails', '>= 4.0'
|
|
@@ -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]]
|
data/lib/haml/engine.rb
CHANGED
|
@@ -17,13 +17,13 @@ module Haml
|
|
|
17
17
|
:buffer_class,
|
|
18
18
|
generator: Temple::Generators::StringBuffer,
|
|
19
19
|
format: :html,
|
|
20
|
-
attr_quote: "'
|
|
20
|
+
attr_quote: '"',
|
|
21
21
|
escape_html: true,
|
|
22
22
|
escape_attrs: true,
|
|
23
23
|
autoclose: %w(area base basefont br col command embed frame
|
|
24
24
|
hr img input isindex keygen link menuitem meta
|
|
25
25
|
param source track wbr),
|
|
26
|
-
filename:
|
|
26
|
+
filename: '',
|
|
27
27
|
disable_capture: false,
|
|
28
28
|
remove_whitespace: false,
|
|
29
29
|
)
|
data/lib/haml/filters/plain.rb
CHANGED
data/lib/haml/filters/ruby.rb
CHANGED
data/lib/haml/parser.rb
CHANGED
data/lib/haml/rails_template.rb
CHANGED
|
@@ -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}
|
|
44
|
-
postamble: "<!-- END #{template.short_identifier}
|
|
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
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:
|
|
4
|
+
version: 7.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Natalie Weizenbaum
|
|
@@ -111,20 +111,6 @@ dependencies:
|
|
|
111
111
|
- - ">="
|
|
112
112
|
- !ruby/object:Gem::Version
|
|
113
113
|
version: '0'
|
|
114
|
-
- !ruby/object:Gem::Dependency
|
|
115
|
-
name: haml
|
|
116
|
-
requirement: !ruby/object:Gem::Requirement
|
|
117
|
-
requirements:
|
|
118
|
-
- - ">="
|
|
119
|
-
- !ruby/object:Gem::Version
|
|
120
|
-
version: '5'
|
|
121
|
-
type: :development
|
|
122
|
-
prerelease: false
|
|
123
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
124
|
-
requirements:
|
|
125
|
-
- - ">="
|
|
126
|
-
- !ruby/object:Gem::Version
|
|
127
|
-
version: '5'
|
|
128
114
|
- !ruby/object:Gem::Dependency
|
|
129
115
|
name: less
|
|
130
116
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -330,7 +316,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
330
316
|
requirements:
|
|
331
317
|
- - ">="
|
|
332
318
|
- !ruby/object:Gem::Version
|
|
333
|
-
version: 2.
|
|
319
|
+
version: 3.2.0
|
|
334
320
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
335
321
|
requirements:
|
|
336
322
|
- - ">="
|