haml-edge 2.3.68 → 2.3.69
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.
- data/EDGE_GEM_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/haml/precompiler.rb +17 -7
- metadata +2 -2
data/EDGE_GEM_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.69
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.69
|
data/lib/haml/precompiler.rb
CHANGED
@@ -306,15 +306,23 @@ END
|
|
306
306
|
def flush_merged_text
|
307
307
|
return if @to_merge.empty?
|
308
308
|
|
309
|
-
|
309
|
+
str = ""
|
310
|
+
mtabs = 0
|
311
|
+
newlines = 0
|
312
|
+
@to_merge.each do |type, val, tabs|
|
310
313
|
case type
|
311
314
|
when :text
|
312
|
-
|
315
|
+
str << val.inspect[1...-1]
|
316
|
+
mtabs += tabs
|
313
317
|
when :script
|
314
318
|
if mtabs != 0 && !@options[:ugly]
|
315
319
|
val = "_hamlout.adjust_tabs(#{mtabs}); " + val
|
316
320
|
end
|
317
|
-
|
321
|
+
str << "\#{#{"\n" * newlines}#{val}}"
|
322
|
+
mtabs = 0
|
323
|
+
newlines = 0
|
324
|
+
when :newlines
|
325
|
+
newlines += val
|
318
326
|
else
|
319
327
|
raise SyntaxError.new("[HAML BUG] Undefined entry in Haml::Precompiler@to_merge.")
|
320
328
|
end
|
@@ -322,10 +330,11 @@ END
|
|
322
330
|
|
323
331
|
@precompiled <<
|
324
332
|
if @options[:ugly]
|
325
|
-
"_hamlout.buffer << \"#{
|
333
|
+
"_hamlout.buffer << \"#{str}\";"
|
326
334
|
else
|
327
|
-
"_hamlout.push_text(\"#{
|
335
|
+
"_hamlout.push_text(\"#{str}\", #{mtabs}, #{@dont_tab_up_next_text.inspect});"
|
328
336
|
end
|
337
|
+
@precompiled << "\n" * newlines
|
329
338
|
@to_merge = []
|
330
339
|
@dont_tab_up_next_text = false
|
331
340
|
end
|
@@ -1008,8 +1017,7 @@ END
|
|
1008
1017
|
|
1009
1018
|
def resolve_newlines
|
1010
1019
|
return unless @newlines > 0
|
1011
|
-
|
1012
|
-
@precompiled << "\n" * @newlines
|
1020
|
+
@to_merge << [:newlines, @newlines]
|
1013
1021
|
@newlines = 0
|
1014
1022
|
end
|
1015
1023
|
|
@@ -1033,6 +1041,8 @@ END
|
|
1033
1041
|
when :script
|
1034
1042
|
last[1].gsub!(/\(haml_temp, (.*?)\);$/, '(haml_temp.rstrip, \1);')
|
1035
1043
|
rstrip_buffer! index - 1
|
1044
|
+
when :newlines
|
1045
|
+
rstrip_buffer! index - 1
|
1036
1046
|
else
|
1037
1047
|
raise SyntaxError.new("[HAML BUG] Undefined entry in Haml::Precompiler@to_merge.")
|
1038
1048
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml-edge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.69
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Weizenbaum
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-11-
|
13
|
+
date: 2009-11-04 00:00:00 -05:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|