rexleparser 0.5.8 → 0.5.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a5d991a280ef4abae08dec0939207a3f733a186
4
- data.tar.gz: ed2b52b5072bb4ce90e7a53735c4b335296d4290
3
+ metadata.gz: 8258d5d421fa3d0fc502c413c7ed1c5c2be927d8
4
+ data.tar.gz: be193636ca0e679cab459437f36f04e20f59a5a1
5
5
  SHA512:
6
- metadata.gz: 103473a843dc1f21e19eb695b14cfbd1d55b4a3ad488436dcce351e373d51be8f129eb00bedbfc70d79342e8339ca349856814fea46c0e869d291163d0eee6ff
7
- data.tar.gz: 423384afc80e9565070228760c3097a85caa75ee5cb2864d54830ecd36466090e6e644ff7a76dd45a83c4b8de40773108ad4f0e5a1c5802551778dcd55e74c64
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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rexleparser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file