rexle 1.5.10 → 1.5.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b31472c5a71d46b454252d7fed48da965947c273d4ec06b713d2436260bda89d
4
- data.tar.gz: 8adb3f90e4d6990f87aaca0ef6274413d517066833633e71a462d87d777f8018
3
+ metadata.gz: cc1ce190fc92b2ffac2b01b9e8ad9be1e8b135ba96336b6b694fb68f819bb03b
4
+ data.tar.gz: 1b045de95ba0ed3d8087d5e87a175e57fc9ae9438e155ebe39c269c78d4f5e84
5
5
  SHA512:
6
- metadata.gz: 7a670f100e792f5753834a34115818646a211cdb5826dc822778f361511f5323800afc4ca0616cb994ea48753dbce57b2e522a4881c2aa08ba84a1cf9182efa3
7
- data.tar.gz: 7b62e0c8507727a00f1eb62d8d8582ad6ca5e009cfa6547474b96bd3cf4563b93f3fc02cbd644e16752c4d7141fb0bdeb7a20d8ceb8a317720d8bd1cd3a300f9
6
+ metadata.gz: e0b2f46ec5952957cf74618f844f4b63453429078dbe58fe2f051785b2aea25f5e480604368014f8f364db6e00c731b72eda69afd10896b11f8d32ff6930d83c
7
+ data.tar.gz: 23413dda0d64adc251a64373b90f4040c147a8ff5eaf9936bdcbfeecbe1e26e9bbacb00ebdb1152a72639783e6e3a873ffc12db5ab974b1d9db553c2badea83b
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/rexle.rb CHANGED
@@ -13,7 +13,8 @@ require 'backtrack-xpath'
13
13
 
14
14
  # modifications:
15
15
 
16
- # 20-Feb-2021: bug fix: The @instructions accessor is now ignored if nil
16
+ # 03-Apr-2021: bug fix: Using *to_a* a CDATA element if present is now output
17
+ # 20-Feb-2021: bug fix: The @instructions accessor is now ignored if nil.
17
18
  # 11-Sep-2020: feature: Rexle::Element#text now has unescaped HTML using CGI
18
19
  # 30-Jul-2020: minor improvement: #plaintext now unescapes & to &
19
20
  # 11-May-2020: bug fix: Rexle#css now responds correctly to valid selectors
@@ -139,7 +140,11 @@ module XMLhelper
139
140
 
140
141
  if x.is_a? Rexle::Element then
141
142
 
142
- a = [String.new(x.name), Hash.new(x.attributes), x.value.to_s]
143
+ a = [String.new(x.name), Hash.new(x.attributes), x.value.to_s]
144
+
145
+ if x.cdatas.any? then
146
+ a.concat x.cdatas.map {|cdata| ['![', {}, cdata] }
147
+ end
143
148
 
144
149
  (a.concat(scan_to_a(x.children))) if x.children.length > 1
145
150
  r << a
@@ -1067,7 +1072,13 @@ class Rexle
1067
1072
  alias text= value=
1068
1073
 
1069
1074
  def to_a()
1075
+
1070
1076
  e = [String.new(self.name), Hash.new(self.attributes)]
1077
+
1078
+ if self.cdatas.any? then
1079
+ e.concat self.cdatas.map {|cdata| ['![', {}, cdata] }
1080
+ end
1081
+
1071
1082
  [*e, *scan_to_a(self.children)]
1072
1083
  end
1073
1084
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rexle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.10
4
+ version: 1.5.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  7GC2GlG9BZ9Re4sfu0pwhOe4qFiGyJciH9BWM8DpSRJPbEmLeoNUdU23JgQPhhkO
36
36
  Kiffp9M4EsB/3/3SNM/RVklK
37
37
  -----END CERTIFICATE-----
38
- date: 2021-02-20 00:00:00.000000000 Z
38
+ date: 2021-04-03 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: c32
metadata.gz.sig CHANGED
Binary file