rexleparser 0.5.8 → 0.5.9
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.tar.gz.sig +0 -0
- data/lib/rexleparser.rb +5 -6
- metadata +1 -1
- 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: 8258d5d421fa3d0fc502c413c7ed1c5c2be927d8
|
4
|
+
data.tar.gz: be193636ca0e679cab459437f36f04e20f59a5a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b85289de149d1a78ab742214a92a73b39b75ac50518e8da70c6e1e740b7abeb3239d928a9ce306351750e0aa6fbdb5b74b68b15a95626748b9cef73a0a27af21
|
7
|
+
data.tar.gz: a085d0aaa231a3c2b45c8aaa0f3fcfaaa6b6853571e192fd475e6fa622f5dd7992a2291cf2b19134cb7abd17b27745cb5cc739407728e87a179bc54b678a0b7f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rexleparser.rb
CHANGED
@@ -23,7 +23,7 @@ class RexleParser
|
|
23
23
|
|
24
24
|
|
25
25
|
def scan_next(r, tagname)
|
26
|
-
|
26
|
+
|
27
27
|
j = tagname
|
28
28
|
|
29
29
|
if r[0] == '>' then
|
@@ -73,11 +73,11 @@ class RexleParser
|
|
73
73
|
return [:newnode] if tag[/^>.*[\w!]+\/<$/]
|
74
74
|
|
75
75
|
end # end of tag match
|
76
|
-
|
76
|
+
|
77
77
|
else
|
78
78
|
|
79
79
|
# it's a text value
|
80
|
-
i = r =~ />["'\w]/
|
80
|
+
i = r =~ />(?:[\-\/"'\w]|\]\])/ # collect until a tag is found or a CDATA element
|
81
81
|
text = r.slice!(0,i)
|
82
82
|
|
83
83
|
return [:child, text] if text
|
@@ -95,7 +95,7 @@ class RexleParser
|
|
95
95
|
end
|
96
96
|
|
97
97
|
def parse_node(r, j=nil)
|
98
|
-
|
98
|
+
|
99
99
|
return unless r.length > 0
|
100
100
|
|
101
101
|
tag = r.slice!(/^>[^<]+</) if (r =~ /^>[^<]+</) == 0
|
@@ -106,7 +106,6 @@ class RexleParser
|
|
106
106
|
len = ($1).length
|
107
107
|
tag += r.slice!(0,i+len)
|
108
108
|
|
109
|
-
#exit
|
110
109
|
# it's a comment tag
|
111
110
|
return create_comment tag
|
112
111
|
end
|
@@ -122,7 +121,7 @@ class RexleParser
|
|
122
121
|
|
123
122
|
until end_tag do
|
124
123
|
|
125
|
-
key, res = scan_next r, tagname
|
124
|
+
key, res = scan_next r, tagname
|
126
125
|
|
127
126
|
case key
|
128
127
|
when :end_tag
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|