rexle 0.3.1 → 0.3.2
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/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
|