haml 5.0.4 → 6.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/FUNDING.yml +1 -0
- data/.github/workflows/test.yml +40 -0
- data/.gitignore +16 -15
- data/CHANGELOG.md +62 -1
- data/Gemfile +18 -14
- data/MIT-LICENSE +2 -2
- data/README.md +4 -5
- data/REFERENCE.md +46 -12
- data/Rakefile +93 -103
- data/bin/bench +66 -0
- data/bin/console +11 -0
- data/bin/ruby +3 -0
- data/bin/setup +7 -0
- data/bin/stackprof +27 -0
- data/bin/test +24 -0
- data/exe/haml +6 -0
- data/ext/haml/extconf.rb +10 -0
- data/ext/haml/haml.c +537 -0
- data/ext/haml/hescape.c +108 -0
- data/ext/haml/hescape.h +20 -0
- data/haml.gemspec +39 -30
- data/lib/haml/ambles.rb +20 -0
- data/lib/haml/attribute_builder.rb +140 -128
- data/lib/haml/attribute_compiler.rb +86 -181
- data/lib/haml/attribute_parser.rb +86 -124
- data/lib/haml/cli.rb +154 -0
- data/lib/haml/compiler/children_compiler.rb +126 -0
- data/lib/haml/compiler/comment_compiler.rb +39 -0
- data/lib/haml/compiler/doctype_compiler.rb +46 -0
- data/lib/haml/compiler/script_compiler.rb +116 -0
- data/lib/haml/compiler/silent_script_compiler.rb +24 -0
- data/lib/haml/compiler/tag_compiler.rb +76 -0
- data/lib/haml/compiler.rb +64 -298
- data/lib/haml/dynamic_merger.rb +67 -0
- data/lib/haml/engine.rb +43 -219
- data/lib/haml/error.rb +29 -27
- data/lib/haml/escapable.rb +6 -42
- data/lib/haml/filters/base.rb +12 -0
- data/lib/haml/filters/cdata.rb +20 -0
- data/lib/haml/filters/coffee.rb +17 -0
- data/lib/haml/filters/css.rb +33 -0
- data/lib/haml/filters/erb.rb +10 -0
- data/lib/haml/filters/escaped.rb +22 -0
- data/lib/haml/filters/javascript.rb +33 -0
- data/lib/haml/filters/less.rb +20 -0
- data/lib/haml/filters/markdown.rb +11 -0
- data/lib/haml/filters/plain.rb +29 -0
- data/lib/haml/filters/preserve.rb +22 -0
- data/lib/haml/filters/ruby.rb +10 -0
- data/lib/haml/filters/sass.rb +15 -0
- data/lib/haml/filters/scss.rb +15 -0
- data/lib/haml/filters/text_base.rb +25 -0
- data/lib/haml/filters/tilt_base.rb +49 -0
- data/lib/haml/filters.rb +55 -378
- data/lib/haml/force_escapable.rb +29 -0
- data/lib/haml/helpers.rb +4 -696
- data/lib/haml/html.rb +22 -0
- data/lib/haml/identity.rb +13 -0
- data/lib/haml/object_ref.rb +30 -0
- data/lib/haml/parser.rb +208 -43
- data/lib/haml/rails_helpers.rb +51 -0
- data/lib/haml/rails_template.rb +55 -0
- data/lib/haml/railtie.rb +7 -40
- data/lib/haml/ruby_expression.rb +32 -0
- data/lib/haml/string_splitter.rb +20 -0
- data/lib/haml/template.rb +15 -33
- data/lib/haml/temple_line_counter.rb +2 -0
- data/lib/haml/util.rb +23 -21
- data/lib/haml/version.rb +1 -1
- data/lib/haml.rb +8 -19
- metadata +222 -50
- data/.gitmodules +0 -3
- data/.travis.yml +0 -54
- data/.yardopts +0 -23
- data/TODO +0 -24
- data/benchmark.rb +0 -66
- data/bin/haml +0 -9
- data/lib/haml/.gitattributes +0 -1
- data/lib/haml/buffer.rb +0 -235
- data/lib/haml/exec.rb +0 -348
- data/lib/haml/generator.rb +0 -41
- data/lib/haml/helpers/action_view_extensions.rb +0 -59
- data/lib/haml/helpers/action_view_mods.rb +0 -129
- data/lib/haml/helpers/action_view_xss_mods.rb +0 -59
- data/lib/haml/helpers/safe_erubi_template.rb +0 -19
- data/lib/haml/helpers/safe_erubis_template.rb +0 -32
- data/lib/haml/helpers/xss_mods.rb +0 -110
- data/lib/haml/options.rb +0 -273
- data/lib/haml/plugin.rb +0 -34
- data/lib/haml/sass_rails_filter.rb +0 -46
- data/lib/haml/template/options.rb +0 -26
- data/lib/haml/temple_engine.rb +0 -121
- data/yard/default/.gitignore +0 -1
- data/yard/default/fulldoc/html/css/common.sass +0 -15
- data/yard/default/layout/html/footer.erb +0 -12
data/lib/haml/railtie.rb
CHANGED
|
@@ -1,48 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
require '
|
|
3
|
-
|
|
4
|
-
# check for a compatible Rails version when Haml is loaded
|
|
5
|
-
if (activesupport_spec = Gem.loaded_specs['activesupport'])
|
|
6
|
-
if activesupport_spec.version.to_s < '3.2'
|
|
7
|
-
raise Exception.new("\n\n** Haml now requires Rails 3.2 and later. Use Haml version 4.0.4\n\n")
|
|
8
|
-
end
|
|
9
|
-
end
|
|
2
|
+
require 'rails'
|
|
10
3
|
|
|
11
4
|
module Haml
|
|
12
|
-
module Filters
|
|
13
|
-
module RailsErb
|
|
14
|
-
extend Plain
|
|
15
|
-
extend TiltFilter
|
|
16
|
-
extend PrecompiledTiltFilter
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
|
|
20
5
|
class Railtie < ::Rails::Railtie
|
|
21
|
-
initializer :haml do |app|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
require "haml/sass_rails_filter"
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
# Any object under ActionView::Template will be defined as the root constant with the same
|
|
30
|
-
# name if it exists. If Erubi is loaded at all, ActionView::Template::Handlers::ERB::Erubi
|
|
31
|
-
# will turn out to be a reference to the ::Erubi module.
|
|
32
|
-
# In Rails 4.2, calling const_defined? results in odd exceptions, which seems to be
|
|
33
|
-
# solved by looking for ::Erubi first.
|
|
34
|
-
# However, in JRuby, the const_defined? finds it anyway, so we must make sure that it's
|
|
35
|
-
# not just a reference to ::Erubi.
|
|
36
|
-
if defined?(::Erubi) && const_defined?('ActionView::Template::Handlers::ERB::Erubi') &&
|
|
37
|
-
ActionView::Template::Handlers::ERB::Erubi != ::Erubi
|
|
38
|
-
require "haml/helpers/safe_erubi_template"
|
|
39
|
-
Haml::Filters::RailsErb.template_class = Haml::SafeErubiTemplate
|
|
40
|
-
else
|
|
41
|
-
require "haml/helpers/safe_erubis_template"
|
|
42
|
-
Haml::Filters::RailsErb.template_class = Haml::SafeErubisTemplate
|
|
43
|
-
end
|
|
44
|
-
Haml::Template.options[:filters] = { 'erb' => Haml::Filters::RailsErb }
|
|
6
|
+
initializer :haml, before: :load_config_initializers do |app|
|
|
7
|
+
# Load haml/plugin first to override if available
|
|
8
|
+
begin
|
|
9
|
+
require 'haml/plugin'
|
|
10
|
+
rescue LoadError
|
|
45
11
|
end
|
|
12
|
+
require 'haml/rails_template'
|
|
46
13
|
end
|
|
47
14
|
end
|
|
48
15
|
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require 'ripper'
|
|
3
|
+
|
|
4
|
+
module Haml
|
|
5
|
+
class RubyExpression < Ripper
|
|
6
|
+
class ParseError < StandardError; end
|
|
7
|
+
|
|
8
|
+
def self.syntax_error?(code)
|
|
9
|
+
self.new(code).parse
|
|
10
|
+
false
|
|
11
|
+
rescue ParseError
|
|
12
|
+
true
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def self.string_literal?(code)
|
|
16
|
+
return false if syntax_error?(code)
|
|
17
|
+
|
|
18
|
+
type, instructions = Ripper.sexp(code)
|
|
19
|
+
return false if type != :program
|
|
20
|
+
return false if instructions.size > 1
|
|
21
|
+
|
|
22
|
+
type, _ = instructions.first
|
|
23
|
+
type == :string_literal
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
private
|
|
27
|
+
|
|
28
|
+
def on_parse_error(*)
|
|
29
|
+
raise ParseError
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require 'ripper'
|
|
3
|
+
require 'haml/ruby_expression'
|
|
4
|
+
|
|
5
|
+
module Haml
|
|
6
|
+
module StringSplitter
|
|
7
|
+
# `code` param must be valid string literal
|
|
8
|
+
def self.compile(code)
|
|
9
|
+
unless Ripper.respond_to?(:lex) # truffleruby doesn't have Ripper.lex
|
|
10
|
+
return [[:dynamic, code]]
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
begin
|
|
14
|
+
Temple::Filters::StringSplitter.compile(code)
|
|
15
|
+
rescue Temple::FilterError => e
|
|
16
|
+
raise Haml::InternalError.new(e.message)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
data/lib/haml/template.rb
CHANGED
|
@@ -1,38 +1,20 @@
|
|
|
1
|
-
# frozen_string_literal:
|
|
2
|
-
require '
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require 'haml/helpers/action_view_mods'
|
|
6
|
-
require 'haml/helpers/action_view_extensions'
|
|
7
|
-
end
|
|
8
|
-
else
|
|
9
|
-
require 'haml/helpers/action_view_mods'
|
|
10
|
-
require 'haml/helpers/action_view_extensions'
|
|
11
|
-
end
|
|
12
|
-
require 'haml/helpers/xss_mods'
|
|
13
|
-
require 'haml/helpers/action_view_xss_mods'
|
|
1
|
+
# frozen_string_literal: false
|
|
2
|
+
require 'temple'
|
|
3
|
+
require 'haml/engine'
|
|
4
|
+
require 'haml/helpers'
|
|
14
5
|
|
|
15
6
|
module Haml
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
alias_method :precompiled_method_return_value_without_haml_xss, :precompiled_method_return_value
|
|
21
|
-
alias_method :precompiled_method_return_value, :precompiled_method_return_value_with_haml_xss
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
module Helpers
|
|
25
|
-
include Haml::Helpers::XssMods
|
|
26
|
-
end
|
|
7
|
+
Template = Temple::Templates::Tilt.create(
|
|
8
|
+
Haml::Engine,
|
|
9
|
+
register_as: [:haml, :haml],
|
|
10
|
+
)
|
|
27
11
|
|
|
28
|
-
module
|
|
29
|
-
|
|
30
|
-
|
|
12
|
+
module TemplateExtension
|
|
13
|
+
# Activate Haml::Helpers for tilt templates.
|
|
14
|
+
# https://github.com/judofyr/temple/blob/v0.7.6/lib/temple/mixins/template.rb#L7-L11
|
|
15
|
+
def compile(*)
|
|
16
|
+
"extend Haml::Helpers; #{super}"
|
|
17
|
+
end
|
|
31
18
|
end
|
|
32
|
-
|
|
19
|
+
Template.send(:extend, TemplateExtension)
|
|
33
20
|
end
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Haml::Template.options[:escape_html] = true
|
|
37
|
-
|
|
38
|
-
require 'haml/plugin'
|
data/lib/haml/util.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# frozen_string_literal:
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
begin
|
|
4
4
|
require 'erubis/tiny'
|
|
@@ -14,6 +14,22 @@ module Haml
|
|
|
14
14
|
module Util
|
|
15
15
|
extend self
|
|
16
16
|
|
|
17
|
+
# Java extension is not implemented for JRuby yet.
|
|
18
|
+
# TruffleRuby does not implement `rb_ary_sort_bang`, etc.
|
|
19
|
+
if /java/ === RUBY_PLATFORM || RUBY_ENGINE == 'truffleruby'
|
|
20
|
+
require 'cgi/escape'
|
|
21
|
+
|
|
22
|
+
def self.escape_html(html)
|
|
23
|
+
CGI.escapeHTML(html.to_s)
|
|
24
|
+
end
|
|
25
|
+
else
|
|
26
|
+
require 'haml/haml' # Haml::Util.escape_html
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.escape_html_safe(html)
|
|
30
|
+
html.html_safe? ? html : escape_html(html)
|
|
31
|
+
end
|
|
32
|
+
|
|
17
33
|
# Silence all output to STDERR within a block.
|
|
18
34
|
#
|
|
19
35
|
# @yield A block in which no output will be printed to STDERR
|
|
@@ -35,20 +51,6 @@ module Haml
|
|
|
35
51
|
false
|
|
36
52
|
end
|
|
37
53
|
|
|
38
|
-
# Returns the given text, marked as being HTML-safe.
|
|
39
|
-
# With older versions of the Rails XSS-safety mechanism,
|
|
40
|
-
# this destructively modifies the HTML-safety of `text`.
|
|
41
|
-
#
|
|
42
|
-
# It only works if you are using ActiveSupport or the parameter `text`
|
|
43
|
-
# implements the #html_safe method.
|
|
44
|
-
#
|
|
45
|
-
# @param text [String, nil]
|
|
46
|
-
# @return [String, nil] `text`, marked as HTML-safe
|
|
47
|
-
def html_safe(text)
|
|
48
|
-
return unless text
|
|
49
|
-
text.html_safe
|
|
50
|
-
end
|
|
51
|
-
|
|
52
54
|
# Checks that the encoding of a string is valid
|
|
53
55
|
# and cleans up potential encoding gotchas like the UTF-8 BOM.
|
|
54
56
|
# If it's not, yields an error string describing the invalid character
|
|
@@ -166,7 +168,7 @@ MSG
|
|
|
166
168
|
# and the rest of the string.
|
|
167
169
|
# `["Foo (Bar (Baz bang) bop)", " (Bang (bop bip))"]` in the example above.
|
|
168
170
|
def balance(scanner, start, finish, count = 0)
|
|
169
|
-
str = ''
|
|
171
|
+
str = ''.dup
|
|
170
172
|
scanner = StringScanner.new(scanner) unless scanner.is_a? StringScanner
|
|
171
173
|
regexp = Regexp.new("(.*?)[\\#{start.chr}\\#{finish.chr}]", Regexp::MULTILINE)
|
|
172
174
|
while scanner.scan(regexp)
|
|
@@ -199,7 +201,7 @@ MSG
|
|
|
199
201
|
end
|
|
200
202
|
|
|
201
203
|
def unescape_interpolation(str, escape_html = nil)
|
|
202
|
-
res = ''
|
|
204
|
+
res = ''.dup
|
|
203
205
|
rest = Haml::Util.handle_interpolation str.dump do |scan|
|
|
204
206
|
escapes = (scan[2].size - 1) / 2
|
|
205
207
|
char = scan[3] # '{', '@' or '$'
|
|
@@ -212,9 +214,9 @@ MSG
|
|
|
212
214
|
else
|
|
213
215
|
scan.scan(/\w+/)
|
|
214
216
|
end
|
|
215
|
-
content = eval(
|
|
216
|
-
content
|
|
217
|
-
content = "
|
|
217
|
+
content = eval("\"#{interpolated}\"")
|
|
218
|
+
content = "#{char}#{content}" if char == '@' || char == '$'
|
|
219
|
+
content = "CGI.escapeHTML((#{content}).to_s)" if escape_html
|
|
218
220
|
|
|
219
221
|
res << "\#{#{content}}"
|
|
220
222
|
end
|
|
@@ -234,7 +236,7 @@ MSG
|
|
|
234
236
|
scanner = StringScanner.new(str.dup.force_encoding(Encoding::ASCII_8BIT))
|
|
235
237
|
bom = scanner.scan(/\xEF\xBB\xBF/n)
|
|
236
238
|
return bom unless scanner.scan(/-\s*#\s*/n)
|
|
237
|
-
if coding = try_parse_haml_emacs_magic_comment(scanner)
|
|
239
|
+
if (coding = try_parse_haml_emacs_magic_comment(scanner))
|
|
238
240
|
return bom, coding
|
|
239
241
|
end
|
|
240
242
|
|
data/lib/haml/version.rb
CHANGED
data/lib/haml.rb
CHANGED
|
@@ -1,24 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
require 'haml/engine'
|
|
3
|
+
require 'haml/error'
|
|
2
4
|
require 'haml/version'
|
|
5
|
+
require 'haml/template'
|
|
3
6
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
# * {Haml::Options} is where Haml's runtime options are defined.
|
|
10
|
-
# * {Haml::Error} is raised when Haml encounters an error.
|
|
11
|
-
#
|
|
12
|
-
# Also see the {file:REFERENCE.md full Haml reference}.
|
|
13
|
-
module Haml
|
|
14
|
-
|
|
15
|
-
def self.init_rails(*args)
|
|
16
|
-
# Maintain this as a no-op for any libraries that may be depending on the
|
|
17
|
-
# previous definition here.
|
|
7
|
+
if File.basename($0) != 'haml'
|
|
8
|
+
begin
|
|
9
|
+
require 'rails'
|
|
10
|
+
require 'haml/railtie'
|
|
11
|
+
rescue LoadError
|
|
18
12
|
end
|
|
19
|
-
|
|
20
13
|
end
|
|
21
|
-
|
|
22
|
-
require 'haml/util'
|
|
23
|
-
require 'haml/engine'
|
|
24
|
-
require 'haml/railtie' if defined?(Rails::Railtie)
|
metadata
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: haml
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 6.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Natalie Weizenbaum
|
|
8
8
|
- Hampton Catlin
|
|
9
9
|
- Norman Clarke
|
|
10
10
|
- Akira Matsuda
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
- Takashi Kokubun
|
|
12
|
+
autorequire:
|
|
13
|
+
bindir: exe
|
|
13
14
|
cert_chain: []
|
|
14
|
-
date:
|
|
15
|
+
date: 2022-09-21 00:00:00.000000000 Z
|
|
15
16
|
dependencies:
|
|
16
17
|
- !ruby/object:Gem::Dependency
|
|
17
18
|
name: temple
|
|
@@ -19,14 +20,28 @@ dependencies:
|
|
|
19
20
|
requirements:
|
|
20
21
|
- - ">="
|
|
21
22
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: 0.8.
|
|
23
|
+
version: 0.8.2
|
|
23
24
|
type: :runtime
|
|
24
25
|
prerelease: false
|
|
25
26
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
27
|
requirements:
|
|
27
28
|
- - ">="
|
|
28
29
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: 0.8.
|
|
30
|
+
version: 0.8.2
|
|
31
|
+
- !ruby/object:Gem::Dependency
|
|
32
|
+
name: thor
|
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
|
34
|
+
requirements:
|
|
35
|
+
- - ">="
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '0'
|
|
38
|
+
type: :runtime
|
|
39
|
+
prerelease: false
|
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
+
requirements:
|
|
42
|
+
- - ">="
|
|
43
|
+
- !ruby/object:Gem::Version
|
|
44
|
+
version: '0'
|
|
30
45
|
- !ruby/object:Gem::Dependency
|
|
31
46
|
name: tilt
|
|
32
47
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -42,21 +57,35 @@ dependencies:
|
|
|
42
57
|
- !ruby/object:Gem::Version
|
|
43
58
|
version: '0'
|
|
44
59
|
- !ruby/object:Gem::Dependency
|
|
45
|
-
name:
|
|
60
|
+
name: benchmark_driver
|
|
61
|
+
requirement: !ruby/object:Gem::Requirement
|
|
62
|
+
requirements:
|
|
63
|
+
- - ">="
|
|
64
|
+
- !ruby/object:Gem::Version
|
|
65
|
+
version: '0'
|
|
66
|
+
type: :development
|
|
67
|
+
prerelease: false
|
|
68
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
69
|
+
requirements:
|
|
70
|
+
- - ">="
|
|
71
|
+
- !ruby/object:Gem::Version
|
|
72
|
+
version: '0'
|
|
73
|
+
- !ruby/object:Gem::Dependency
|
|
74
|
+
name: bundler
|
|
46
75
|
requirement: !ruby/object:Gem::Requirement
|
|
47
76
|
requirements:
|
|
48
77
|
- - ">="
|
|
49
78
|
- !ruby/object:Gem::Version
|
|
50
|
-
version:
|
|
79
|
+
version: '0'
|
|
51
80
|
type: :development
|
|
52
81
|
prerelease: false
|
|
53
82
|
version_requirements: !ruby/object:Gem::Requirement
|
|
54
83
|
requirements:
|
|
55
84
|
- - ">="
|
|
56
85
|
- !ruby/object:Gem::Version
|
|
57
|
-
version:
|
|
86
|
+
version: '0'
|
|
58
87
|
- !ruby/object:Gem::Dependency
|
|
59
|
-
name:
|
|
88
|
+
name: coffee-script
|
|
60
89
|
requirement: !ruby/object:Gem::Requirement
|
|
61
90
|
requirements:
|
|
62
91
|
- - ">="
|
|
@@ -70,7 +99,63 @@ dependencies:
|
|
|
70
99
|
- !ruby/object:Gem::Version
|
|
71
100
|
version: '0'
|
|
72
101
|
- !ruby/object:Gem::Dependency
|
|
73
|
-
name:
|
|
102
|
+
name: erubi
|
|
103
|
+
requirement: !ruby/object:Gem::Requirement
|
|
104
|
+
requirements:
|
|
105
|
+
- - ">="
|
|
106
|
+
- !ruby/object:Gem::Version
|
|
107
|
+
version: '0'
|
|
108
|
+
type: :development
|
|
109
|
+
prerelease: false
|
|
110
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
111
|
+
requirements:
|
|
112
|
+
- - ">="
|
|
113
|
+
- !ruby/object:Gem::Version
|
|
114
|
+
version: '0'
|
|
115
|
+
- !ruby/object:Gem::Dependency
|
|
116
|
+
name: haml
|
|
117
|
+
requirement: !ruby/object:Gem::Requirement
|
|
118
|
+
requirements:
|
|
119
|
+
- - ">="
|
|
120
|
+
- !ruby/object:Gem::Version
|
|
121
|
+
version: '5'
|
|
122
|
+
type: :development
|
|
123
|
+
prerelease: false
|
|
124
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
125
|
+
requirements:
|
|
126
|
+
- - ">="
|
|
127
|
+
- !ruby/object:Gem::Version
|
|
128
|
+
version: '5'
|
|
129
|
+
- !ruby/object:Gem::Dependency
|
|
130
|
+
name: less
|
|
131
|
+
requirement: !ruby/object:Gem::Requirement
|
|
132
|
+
requirements:
|
|
133
|
+
- - ">="
|
|
134
|
+
- !ruby/object:Gem::Version
|
|
135
|
+
version: '0'
|
|
136
|
+
type: :development
|
|
137
|
+
prerelease: false
|
|
138
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
139
|
+
requirements:
|
|
140
|
+
- - ">="
|
|
141
|
+
- !ruby/object:Gem::Version
|
|
142
|
+
version: '0'
|
|
143
|
+
- !ruby/object:Gem::Dependency
|
|
144
|
+
name: minitest-reporters
|
|
145
|
+
requirement: !ruby/object:Gem::Requirement
|
|
146
|
+
requirements:
|
|
147
|
+
- - "~>"
|
|
148
|
+
- !ruby/object:Gem::Version
|
|
149
|
+
version: '1.1'
|
|
150
|
+
type: :development
|
|
151
|
+
prerelease: false
|
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
153
|
+
requirements:
|
|
154
|
+
- - "~>"
|
|
155
|
+
- !ruby/object:Gem::Version
|
|
156
|
+
version: '1.1'
|
|
157
|
+
- !ruby/object:Gem::Dependency
|
|
158
|
+
name: rails
|
|
74
159
|
requirement: !ruby/object:Gem::Requirement
|
|
75
160
|
requirements:
|
|
76
161
|
- - ">="
|
|
@@ -84,7 +169,77 @@ dependencies:
|
|
|
84
169
|
- !ruby/object:Gem::Version
|
|
85
170
|
version: '4.0'
|
|
86
171
|
- !ruby/object:Gem::Dependency
|
|
87
|
-
name:
|
|
172
|
+
name: rake
|
|
173
|
+
requirement: !ruby/object:Gem::Requirement
|
|
174
|
+
requirements:
|
|
175
|
+
- - ">="
|
|
176
|
+
- !ruby/object:Gem::Version
|
|
177
|
+
version: '0'
|
|
178
|
+
type: :development
|
|
179
|
+
prerelease: false
|
|
180
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
181
|
+
requirements:
|
|
182
|
+
- - ">="
|
|
183
|
+
- !ruby/object:Gem::Version
|
|
184
|
+
version: '0'
|
|
185
|
+
- !ruby/object:Gem::Dependency
|
|
186
|
+
name: rake-compiler
|
|
187
|
+
requirement: !ruby/object:Gem::Requirement
|
|
188
|
+
requirements:
|
|
189
|
+
- - ">="
|
|
190
|
+
- !ruby/object:Gem::Version
|
|
191
|
+
version: '0'
|
|
192
|
+
type: :development
|
|
193
|
+
prerelease: false
|
|
194
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
195
|
+
requirements:
|
|
196
|
+
- - ">="
|
|
197
|
+
- !ruby/object:Gem::Version
|
|
198
|
+
version: '0'
|
|
199
|
+
- !ruby/object:Gem::Dependency
|
|
200
|
+
name: sass
|
|
201
|
+
requirement: !ruby/object:Gem::Requirement
|
|
202
|
+
requirements:
|
|
203
|
+
- - ">="
|
|
204
|
+
- !ruby/object:Gem::Version
|
|
205
|
+
version: '0'
|
|
206
|
+
type: :development
|
|
207
|
+
prerelease: false
|
|
208
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
209
|
+
requirements:
|
|
210
|
+
- - ">="
|
|
211
|
+
- !ruby/object:Gem::Version
|
|
212
|
+
version: '0'
|
|
213
|
+
- !ruby/object:Gem::Dependency
|
|
214
|
+
name: slim
|
|
215
|
+
requirement: !ruby/object:Gem::Requirement
|
|
216
|
+
requirements:
|
|
217
|
+
- - ">="
|
|
218
|
+
- !ruby/object:Gem::Version
|
|
219
|
+
version: '0'
|
|
220
|
+
type: :development
|
|
221
|
+
prerelease: false
|
|
222
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
223
|
+
requirements:
|
|
224
|
+
- - ">="
|
|
225
|
+
- !ruby/object:Gem::Version
|
|
226
|
+
version: '0'
|
|
227
|
+
- !ruby/object:Gem::Dependency
|
|
228
|
+
name: string_template
|
|
229
|
+
requirement: !ruby/object:Gem::Requirement
|
|
230
|
+
requirements:
|
|
231
|
+
- - ">="
|
|
232
|
+
- !ruby/object:Gem::Version
|
|
233
|
+
version: '0'
|
|
234
|
+
type: :development
|
|
235
|
+
prerelease: false
|
|
236
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
237
|
+
requirements:
|
|
238
|
+
- - ">="
|
|
239
|
+
- !ruby/object:Gem::Version
|
|
240
|
+
version: '0'
|
|
241
|
+
- !ruby/object:Gem::Dependency
|
|
242
|
+
name: unindent
|
|
88
243
|
requirement: !ruby/object:Gem::Requirement
|
|
89
244
|
requirements:
|
|
90
245
|
- - ">="
|
|
@@ -97,24 +252,19 @@ dependencies:
|
|
|
97
252
|
- - ">="
|
|
98
253
|
- !ruby/object:Gem::Version
|
|
99
254
|
version: '0'
|
|
100
|
-
description:
|
|
101
|
-
Haml (HTML Abstraction Markup Language) is a layer on top of HTML or XML that's
|
|
102
|
-
designed to express the structure of documents in a non-repetitive, elegant, and
|
|
103
|
-
easy way by using indentation rather than closing tags and allowing Ruby to be
|
|
104
|
-
embedded with ease. It was originally envisioned as a plugin for Ruby on Rails,
|
|
105
|
-
but it can function as a stand-alone templating engine.
|
|
255
|
+
description: An elegant, structured (X)HTML/XML templating engine.
|
|
106
256
|
email:
|
|
107
257
|
- haml@googlegroups.com
|
|
108
|
-
-
|
|
258
|
+
- ronnie@dio.jp
|
|
109
259
|
executables:
|
|
110
260
|
- haml
|
|
111
|
-
extensions:
|
|
261
|
+
extensions:
|
|
262
|
+
- ext/haml/extconf.rb
|
|
112
263
|
extra_rdoc_files: []
|
|
113
264
|
files:
|
|
265
|
+
- ".github/FUNDING.yml"
|
|
266
|
+
- ".github/workflows/test.yml"
|
|
114
267
|
- ".gitignore"
|
|
115
|
-
- ".gitmodules"
|
|
116
|
-
- ".travis.yml"
|
|
117
|
-
- ".yardopts"
|
|
118
268
|
- CHANGELOG.md
|
|
119
269
|
- FAQ.md
|
|
120
270
|
- Gemfile
|
|
@@ -122,49 +272,72 @@ files:
|
|
|
122
272
|
- README.md
|
|
123
273
|
- REFERENCE.md
|
|
124
274
|
- Rakefile
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
- bin/
|
|
275
|
+
- bin/bench
|
|
276
|
+
- bin/console
|
|
277
|
+
- bin/ruby
|
|
278
|
+
- bin/setup
|
|
279
|
+
- bin/stackprof
|
|
280
|
+
- bin/test
|
|
281
|
+
- exe/haml
|
|
282
|
+
- ext/haml/extconf.rb
|
|
283
|
+
- ext/haml/haml.c
|
|
284
|
+
- ext/haml/hescape.c
|
|
285
|
+
- ext/haml/hescape.h
|
|
128
286
|
- haml.gemspec
|
|
129
287
|
- lib/haml.rb
|
|
130
|
-
- lib/haml
|
|
288
|
+
- lib/haml/ambles.rb
|
|
131
289
|
- lib/haml/attribute_builder.rb
|
|
132
290
|
- lib/haml/attribute_compiler.rb
|
|
133
291
|
- lib/haml/attribute_parser.rb
|
|
134
|
-
- lib/haml/
|
|
292
|
+
- lib/haml/cli.rb
|
|
135
293
|
- lib/haml/compiler.rb
|
|
294
|
+
- lib/haml/compiler/children_compiler.rb
|
|
295
|
+
- lib/haml/compiler/comment_compiler.rb
|
|
296
|
+
- lib/haml/compiler/doctype_compiler.rb
|
|
297
|
+
- lib/haml/compiler/script_compiler.rb
|
|
298
|
+
- lib/haml/compiler/silent_script_compiler.rb
|
|
299
|
+
- lib/haml/compiler/tag_compiler.rb
|
|
300
|
+
- lib/haml/dynamic_merger.rb
|
|
136
301
|
- lib/haml/engine.rb
|
|
137
302
|
- lib/haml/error.rb
|
|
138
303
|
- lib/haml/escapable.rb
|
|
139
|
-
- lib/haml/exec.rb
|
|
140
304
|
- lib/haml/filters.rb
|
|
141
|
-
- lib/haml/
|
|
305
|
+
- lib/haml/filters/base.rb
|
|
306
|
+
- lib/haml/filters/cdata.rb
|
|
307
|
+
- lib/haml/filters/coffee.rb
|
|
308
|
+
- lib/haml/filters/css.rb
|
|
309
|
+
- lib/haml/filters/erb.rb
|
|
310
|
+
- lib/haml/filters/escaped.rb
|
|
311
|
+
- lib/haml/filters/javascript.rb
|
|
312
|
+
- lib/haml/filters/less.rb
|
|
313
|
+
- lib/haml/filters/markdown.rb
|
|
314
|
+
- lib/haml/filters/plain.rb
|
|
315
|
+
- lib/haml/filters/preserve.rb
|
|
316
|
+
- lib/haml/filters/ruby.rb
|
|
317
|
+
- lib/haml/filters/sass.rb
|
|
318
|
+
- lib/haml/filters/scss.rb
|
|
319
|
+
- lib/haml/filters/text_base.rb
|
|
320
|
+
- lib/haml/filters/tilt_base.rb
|
|
321
|
+
- lib/haml/force_escapable.rb
|
|
142
322
|
- lib/haml/helpers.rb
|
|
143
|
-
- lib/haml/
|
|
144
|
-
- lib/haml/
|
|
145
|
-
- lib/haml/
|
|
146
|
-
- lib/haml/helpers/safe_erubi_template.rb
|
|
147
|
-
- lib/haml/helpers/safe_erubis_template.rb
|
|
148
|
-
- lib/haml/helpers/xss_mods.rb
|
|
149
|
-
- lib/haml/options.rb
|
|
323
|
+
- lib/haml/html.rb
|
|
324
|
+
- lib/haml/identity.rb
|
|
325
|
+
- lib/haml/object_ref.rb
|
|
150
326
|
- lib/haml/parser.rb
|
|
151
|
-
- lib/haml/
|
|
327
|
+
- lib/haml/rails_helpers.rb
|
|
328
|
+
- lib/haml/rails_template.rb
|
|
152
329
|
- lib/haml/railtie.rb
|
|
153
|
-
- lib/haml/
|
|
330
|
+
- lib/haml/ruby_expression.rb
|
|
331
|
+
- lib/haml/string_splitter.rb
|
|
154
332
|
- lib/haml/template.rb
|
|
155
|
-
- lib/haml/template/options.rb
|
|
156
|
-
- lib/haml/temple_engine.rb
|
|
157
333
|
- lib/haml/temple_line_counter.rb
|
|
158
334
|
- lib/haml/util.rb
|
|
159
335
|
- lib/haml/version.rb
|
|
160
|
-
|
|
161
|
-
- yard/default/fulldoc/html/css/common.sass
|
|
162
|
-
- yard/default/layout/html/footer.erb
|
|
163
|
-
homepage: http://haml.info/
|
|
336
|
+
homepage: https://haml.info
|
|
164
337
|
licenses:
|
|
165
338
|
- MIT
|
|
166
339
|
metadata: {}
|
|
167
|
-
post_install_message:
|
|
340
|
+
post_install_message:
|
|
168
341
|
rdoc_options: []
|
|
169
342
|
require_paths:
|
|
170
343
|
- lib
|
|
@@ -172,16 +345,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
172
345
|
requirements:
|
|
173
346
|
- - ">="
|
|
174
347
|
- !ruby/object:Gem::Version
|
|
175
|
-
version: 2.
|
|
348
|
+
version: 2.1.0
|
|
176
349
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
350
|
requirements:
|
|
178
351
|
- - ">="
|
|
179
352
|
- !ruby/object:Gem::Version
|
|
180
353
|
version: '0'
|
|
181
354
|
requirements: []
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
signing_key:
|
|
355
|
+
rubygems_version: 3.3.7
|
|
356
|
+
signing_key:
|
|
185
357
|
specification_version: 4
|
|
186
358
|
summary: An elegant, structured (X)HTML/XML templating engine.
|
|
187
359
|
test_files: []
|
data/.gitmodules
DELETED