line-tree 0.5.4 → 0.5.5
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/line-tree.rb +5 -5
- data.tar.gz.sig +1 -1
- metadata +1 -1
- metadata.gz.sig +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2032ea4afb86bb78856a54e03f797a8f74c5109d
|
4
|
+
data.tar.gz: d007c841120c62566b82365cb0f99523c5fe7eff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9f36d9ae9d78c46dcad0f7206a9637b2424873611e68e7b657f5f7d1a7c395db733caf47f1add73ad1b5eab1e139f9818288e85936f9d36467df09e9634fc65
|
7
|
+
data.tar.gz: 899e27c89a2415cdd7ab0d13cfe2445697d3df607e7224067af99e16101de8c4271a6b70c0d72a3f62bee84f4dcd59cc83f05a235fce6f81a56ea044aec68848
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/line-tree.rb
CHANGED
@@ -67,7 +67,7 @@ class LineTree
|
|
67
67
|
|
68
68
|
r = s.match(/('[^']+[']|[^\s]+)\s*(\{.*\})?\s*(.*)/m)
|
69
69
|
.captures.values_at(0,1,-1)
|
70
|
-
|
70
|
+
puts 'r: ' + r.inspect
|
71
71
|
if r[1] then
|
72
72
|
|
73
73
|
r[1] = get_attributes(r[1])
|
@@ -98,13 +98,13 @@ class LineTree
|
|
98
98
|
def get_attributes(s)
|
99
99
|
|
100
100
|
a = s.scan(/\w+: ["'][^"']+["']/).map do |attr|
|
101
|
-
|
101
|
+
puts 'attr: ' + attr.inspect
|
102
102
|
name, val = attr.match(/\s*([^:=]+)[:=]\s*['"]*\
|
103
|
-
([a-zA-Z0-9\(\);\-\/:\.,\s"'_\{\}]*)/).captures
|
103
|
+
([a-zA-Z0-9\(\);\-\/:\.,\s"'_\{\}\$]*)/).captures
|
104
104
|
[name, val.sub(/['"]$/,'')]
|
105
105
|
end
|
106
106
|
|
107
|
-
|
107
|
+
puts 'a: ' + a.inspect
|
108
108
|
Hash[*a.flatten]
|
109
109
|
end
|
110
110
|
|
@@ -122,4 +122,4 @@ class LineTree
|
|
122
122
|
end
|
123
123
|
|
124
124
|
|
125
|
-
end
|
125
|
+
end
|
data.tar.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
4��K�Ϲ�W��V2�܈��]���d.|+��\���5������s8+�q��ڼ��ep �p}#���_}�B�����L|z���cJj��A��)����ތ�_���,d�b�67�C�����3!G�-J"�1��nɋfVi�q�p�S��x��%f�v�F��of�9x&���/[�;�h��*A��f&����'Nd���Ͽ���H��Co&/�_4��:YK�O`�g/�-�������vX
|
metadata
CHANGED
metadata.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
6�B�?I��S��գJ&�CHnB7����?�2����m�L�Br�������_��T����1��>��Y�ޣ#q�P�Q����qs�t8�P
|
2
|
+
���mK���4N�����u����"b
|