haml 7.5.0 → 7.5.1
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/CHANGELOG.md +4 -0
- data/lib/haml/dynamic_merger.rb +1 -1
- data/lib/haml/engine.rb +1 -1
- data/lib/haml/parser.rb +5 -5
- data/lib/haml/util.rb +2 -2
- data/lib/haml/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8cf8d7cf95a5096090897276b03dd8073e73705fa1b880bba96af5dceb3b2c55
|
|
4
|
+
data.tar.gz: 4d1e1ff1bd53361d0a31c78533a838e60e52d10c5646ff0d8bbd87a552ccc658
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3bbfe67377d06702fa3240048fd25410f885f05a503d4e8e7793f0ccbba9ffb99e601d46068150d2170c11a3807660571fe26f337becfc155758f05cc470bc40
|
|
7
|
+
data.tar.gz: '01159a17fda467397309cfa38de5ad7b1e8820d506447b87221a8cdc087f02e8546cb1d2ad9a358d4ad0fa0c0b29c60b0a03bcf692e2fa551d748111701d8adc'
|
data/CHANGELOG.md
CHANGED
data/lib/haml/dynamic_merger.rb
CHANGED
data/lib/haml/engine.rb
CHANGED
data/lib/haml/parser.rb
CHANGED
|
@@ -227,7 +227,7 @@ module Haml
|
|
|
227
227
|
end
|
|
228
228
|
|
|
229
229
|
def inspect
|
|
230
|
-
%Q[(#{type} #{value.inspect}#{children.each_with_object(''
|
|
230
|
+
%Q[(#{type} #{value.inspect}#{children.each_with_object(+'') {|c, s| s << "\n#{c.inspect.gsub!(/^/, ' ')}"}})]
|
|
231
231
|
end
|
|
232
232
|
end
|
|
233
233
|
|
|
@@ -403,7 +403,7 @@ module Haml
|
|
|
403
403
|
def haml_comment(text)
|
|
404
404
|
if filter_opened?
|
|
405
405
|
@flat = true
|
|
406
|
-
@filter_buffer =
|
|
406
|
+
@filter_buffer = +''
|
|
407
407
|
@filter_buffer << "#{text}\n" unless text.empty?
|
|
408
408
|
text = @filter_buffer
|
|
409
409
|
# If we don't know the indentation by now, it'll be set in Line#tabs
|
|
@@ -539,7 +539,7 @@ module Haml
|
|
|
539
539
|
|
|
540
540
|
if filter_opened?
|
|
541
541
|
@flat = true
|
|
542
|
-
@filter_buffer =
|
|
542
|
+
@filter_buffer = +''
|
|
543
543
|
# If we don't know the indentation by now, it'll be set in Line#tabs
|
|
544
544
|
@flat_spaces = @indentation * (@template_tabs+1) if @indentation
|
|
545
545
|
end
|
|
@@ -749,7 +749,7 @@ module Haml
|
|
|
749
749
|
end
|
|
750
750
|
|
|
751
751
|
static_attributes = {}
|
|
752
|
-
dynamic_attributes = "{"
|
|
752
|
+
dynamic_attributes = +"{"
|
|
753
753
|
attributes.each do |name, (type, val)|
|
|
754
754
|
if type == :static
|
|
755
755
|
static_attributes[name] = val
|
|
@@ -789,7 +789,7 @@ module Haml
|
|
|
789
789
|
|
|
790
790
|
return name, [:static, content.first[1]] if content.size == 1
|
|
791
791
|
return name, [:dynamic,
|
|
792
|
-
%!"#{content.each_with_object(''
|
|
792
|
+
%!"#{content.each_with_object(+'') {|(t, v), s| s << (t == :str ? Util.inspect_obj(v)[1...-1] : "\#{#{v}}")}}"!]
|
|
793
793
|
end
|
|
794
794
|
|
|
795
795
|
def next_line
|
data/lib/haml/util.rb
CHANGED
|
@@ -168,7 +168,7 @@ MSG
|
|
|
168
168
|
# and the rest of the string.
|
|
169
169
|
# `["Foo (Bar (Baz bang) bop)", " (Bang (bop bip))"]` in the example above.
|
|
170
170
|
def balance(scanner, start, finish, count = 0)
|
|
171
|
-
str = ''
|
|
171
|
+
str = +''
|
|
172
172
|
scanner = StringScanner.new(scanner) unless scanner.is_a? StringScanner
|
|
173
173
|
regexp = Regexp.new("(.*?)[\\#{start.chr}\\#{finish.chr}]", Regexp::MULTILINE)
|
|
174
174
|
while scanner.scan(regexp)
|
|
@@ -201,7 +201,7 @@ MSG
|
|
|
201
201
|
end
|
|
202
202
|
|
|
203
203
|
def unescape_interpolation(str)
|
|
204
|
-
res = ''
|
|
204
|
+
res = +''
|
|
205
205
|
rest = Haml::Util.handle_interpolation str.dump do |scan|
|
|
206
206
|
escapes = (scan[2].size - 1) / 2
|
|
207
207
|
char = scan[3] # '{', '@' or '$'
|
data/lib/haml/version.rb
CHANGED