domle 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/domle.rb +11 -8
- data.tar.gz.sig +2 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb3013d941c1c1b1d0b13f23f9acf8b20f39997f
|
4
|
+
data.tar.gz: f8f62155e72a7dff085b873c80b99702b1ec534c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4fd7b2fd084715d8a920b7d5d693be8752e3d5cb81f122aa528a90035ffea30fe4a43287cff44f24eb9ec3bc4537df68b7759b6cff5e728b8d1e8d1f84f38a3
|
7
|
+
data.tar.gz: c83d09b5a84a56468ecb7aa87f6e23bb410c684c68bf3a8f8371c27a399e5a526e826e62a779d67bc30bacd49527fa193dc9a95a06f93144b1d33815a02f680f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/domle.rb
CHANGED
@@ -129,14 +129,13 @@ class Domle < Rexle
|
|
129
129
|
|
130
130
|
raw_selector,raw_styles = entry.split(/{/,2)
|
131
131
|
|
132
|
-
h = raw_styles.split(/;/).inject({}) do |r, x|
|
132
|
+
h = raw_styles.strip.split(/;/).inject({}) do |r, x|
|
133
133
|
k, v = x.split(/:/,2).map(&:strip)
|
134
134
|
r.merge(k.to_sym => v)
|
135
135
|
end
|
136
136
|
|
137
137
|
[raw_selector.split(/,\s*/).map(&:strip), h]
|
138
138
|
end
|
139
|
-
|
140
139
|
|
141
140
|
# add each CSS style attribute to the element
|
142
141
|
# e.g. a = [[['line'],{stroke: 'green'}]]
|
@@ -176,25 +175,29 @@ class Domle < Rexle
|
|
176
175
|
if children then
|
177
176
|
|
178
177
|
children.each do |x|
|
178
|
+
|
179
179
|
if x.is_a? Array then
|
180
180
|
|
181
181
|
element.add_element scan_element(*x)
|
182
|
+
|
182
183
|
elsif x.is_a? String then
|
183
184
|
|
184
|
-
|
185
|
+
if x.is_a? String then
|
185
186
|
|
186
|
-
x
|
187
|
+
element.add_element(x) if x.strip.length > 0
|
188
|
+
|
187
189
|
elsif x.name == '![' then
|
188
190
|
|
189
|
-
Rexle::CData.new(x)
|
191
|
+
e = Rexle::CData.new(x)
|
192
|
+
element.add_element e
|
190
193
|
|
191
194
|
elsif x.name == '!-' then
|
192
195
|
|
193
|
-
Rexle::Comment.new(x)
|
196
|
+
e = Rexle::Comment.new(x)
|
197
|
+
element.add_element e
|
194
198
|
|
195
199
|
end
|
196
|
-
|
197
|
-
element.add_element e
|
200
|
+
|
198
201
|
end
|
199
202
|
end
|
200
203
|
end
|
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
DI����\(�"����t&mh������E�t��͏�K�o�x���uc<�h���6����m`�\��o�"��(M;��i�e�r���@��]��C4��*4fߟ)�BI��Ӄ�U��}��:W�����ϪN�%D�D������g�4%��D��_!ٍ&D��S��J͒��0�C���
|
2
|
+
��-T^��vV?^�Ry=rW�<�W����u�5x�����$���k4������q�a���
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: domle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
muChG/wXkD8GIq07qcmVUML8wWvVNdAWtcW8E1gAnZxpblXiaPWUR2/GPHFIWD96
|
32
32
|
MQgLkQyjNK0weA==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-11-
|
34
|
+
date: 2015-11-28 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rexle
|
metadata.gz.sig
CHANGED
Binary file
|