html-tag 3.0.5 → 3.0.6
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/.version +1 -1
- data/lib/html-tag/inbound.rb +5 -4
- 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: 6eaa9e68ea5e104f1daf2c3d36b8e64835ade4e33efa9b662aa2c5da5555c482
|
|
4
|
+
data.tar.gz: 6f48a76f0f4aeb814b9a98f5864bcac91a6b3758f4b015056e8d41876b9bc94d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 936d7c82a1fbe23b232136833f1003b4af0c450f31e2f23d5d9683678b77070f1de8341dd8f0daf672676bb42a91a4dc64ea694688500d87d099918178ccd935
|
|
7
|
+
data.tar.gz: 95b4334aeb8a0286875b9638a2486ed8d6eaa87cf61525151aa6c2fcefd4b9deced6c1bb58b0bdd5fdf1f142ee33a8beeb8d193412146d6a3c892e98bfcc9cff
|
data/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.0.
|
|
1
|
+
3.0.6
|
data/lib/html-tag/inbound.rb
CHANGED
|
@@ -40,9 +40,9 @@ module HtmlTag
|
|
|
40
40
|
|
|
41
41
|
# lets keep all instance vars in one object
|
|
42
42
|
@_iv = IVARS.new
|
|
43
|
-
@_iv.context
|
|
44
|
-
@_iv.data
|
|
45
|
-
@_iv.depth
|
|
43
|
+
@_iv.context = context
|
|
44
|
+
@_iv.data = []
|
|
45
|
+
@_iv.depth = 0
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
# access parent context via parent / context / this
|
|
@@ -107,6 +107,7 @@ module HtmlTag
|
|
|
107
107
|
# nested blocks
|
|
108
108
|
if block
|
|
109
109
|
@_iv.depth += 1
|
|
110
|
+
node_count = @_iv.data.length
|
|
110
111
|
|
|
111
112
|
block_data = if @_iv.context
|
|
112
113
|
# HtmlTag scope
|
|
@@ -116,7 +117,7 @@ module HtmlTag
|
|
|
116
117
|
block.call(self)
|
|
117
118
|
end
|
|
118
119
|
|
|
119
|
-
if block_data.class == String
|
|
120
|
+
if block_data.class == String && node_count == @_iv.data.length
|
|
120
121
|
@_iv.data << block_data
|
|
121
122
|
end
|
|
122
123
|
|