rexle 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rexle.rb +2 -1
- metadata +1 -1
data/lib/rexle.rb
CHANGED
@@ -210,7 +210,8 @@ class Rexle
|
|
210
210
|
match_found = raw_values.match(/(.*)>([^>]*$)/)
|
211
211
|
if match_found then
|
212
212
|
raw_attributes, value = match_found.captures
|
213
|
-
attributes = raw_attributes.
|
213
|
+
attributes = raw_attributes.scan(/(\w+\='[^']+')|(\w+\="[^"]+")/)\
|
214
|
+
.map(&:compact).inject({}) do |r, x|
|
214
215
|
attr_name, val = x.split(/=/)
|
215
216
|
r.merge(attr_name => val[1..-2])
|
216
217
|
end
|