serbea 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serbea/template_engine.rb +11 -2
- data/lib/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: 9dfc45d5f8581d988481bf56c492498b5bbd8b08186910c655e6fa0964fe48dc
|
4
|
+
data.tar.gz: a25507d87ae9eeed0f575cdc5825212ca5d3bfadd1fbe388b7dfc219b53d721d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3da42d61791e24028f5ac9c68c24c6cf73d98f7568ffa87fb04cca4c8f45b77d9dddc4a68025cbbd7e9f58429ccaa95e79eecdae249b7a272d424cf32648ed36
|
7
|
+
data.tar.gz: 216bdddc4a48696fabac9321e9f6d25b63e15adda17a22041f23b7963fd7a807a7840ddfb4e289349309361d8f6285801f651822b0ec86538d07980c54c3fb8b
|
@@ -100,8 +100,17 @@ module Serbea
|
|
100
100
|
else # string or something else
|
101
101
|
pieces[0].prepend "("
|
102
102
|
end
|
103
|
-
|
104
|
-
|
103
|
+
|
104
|
+
includes_block = false
|
105
|
+
pieces.reverse.each do |piece|
|
106
|
+
if piece == "do" && (pieces.last == "do" || pieces.last.end_with?("|"))
|
107
|
+
piece.prepend(") ")
|
108
|
+
includes_block = true
|
109
|
+
break
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
if includes_block
|
105
114
|
buff << "{%:= #{self.class.render_directive}#{pieces.join(" ")} %}"
|
106
115
|
else
|
107
116
|
pieces.last << ")"
|
data/lib/version.rb
CHANGED