rexle 1.5.4 → 1.5.5

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: f2f1804ab0245c2ae09a14b8950cb4cb5995a5d57ca49d835aa6d10f7c075fa8
4
- data.tar.gz: b5e8116e45ee6df9cac50851fead708e961f366a302bffad5cf056313178db0f
3
+ metadata.gz: f1e693a049a5832268f77e719d7149cc57ea49fa1598adbd011c176afe04537b
4
+ data.tar.gz: ace4a564fd8a0dda84e18141cbe915bbdff873bcbaadbc6ab7fc37210c22d870
5
5
  SHA512:
6
- metadata.gz: 80b8d5ee3d5b9eb2049df6bdc3f3ce4656d0da5c36cf2a9bf821d36f55aa378381e964e1e0a87a6aa07d118ed289ef1c23229ee442cc42b1a0fb79b377b821c7
7
- data.tar.gz: 76aefcad66c7f914697d6c8cc61d8f7ceb0f6deb4511d3c18c81de25e415092c8af34c270e36616932753824aad39b6ebecb9e41c5f4b9534840ed07cf71fa26
6
+ metadata.gz: 10b3ae2d1ff181fa7d6591e7215a8fd8830a0e16fece40bde11ea8f40b0fffb8602e8eae9c17e8caa7d58c3c1db3e854d97951718c5abd8fa25fa059d7b87afa
7
+ data.tar.gz: 0a9eaa9b64d846a56d572c0a41007c16d9d6ce30eb7fcc57b9ae5e890b20f5ae5f6fff82b270b84a2b1053ce7ae76df67dc190c7764768bd1cf8f5e6699c10c0
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -13,6 +13,7 @@ require 'backtrack-xpath'
13
13
 
14
14
  # modifications:
15
15
 
16
+ # 23-Apr-2020: feature: Added public method *plaintext*.
16
17
  # 04-Feb-2020: minor bug fix: Element A is now defined as a non self-closing tag
17
18
  # 18-Sep-2019: minor bug fix: &apos is now unescaped properly
18
19
  # 09-Jul-2019: minor improvement: A comment tag now has a
@@ -1000,6 +1001,11 @@ class Rexle
1000
1001
  def insert_before(node) insert(node) end
1001
1002
  def last(a) a.last end
1002
1003
  def map(&blk) self.children.map(&blk) end
1004
+
1005
+ def plaintext()
1006
+ xml().gsub(/<\/?[^>]+>/,'').gsub('&nbsp;',' ').gsub(/\n\s+/,' ')
1007
+ end
1008
+
1003
1009
  def root() self end
1004
1010
 
1005
1011
  def text(s='')
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.4
4
+ version: 1.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  yK32Ci6By/qMCdJdE8pLLZhHuZGIkoYJK7EN7OKPznwuXRCOq7jb44HAIDi4RZST
36
36
  J+lqIOqNxqRJkYpuYSZr+tyd
37
37
  -----END CERTIFICATE-----
38
- date: 2020-02-04 00:00:00.000000000 Z
38
+ date: 2020-04-23 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: c32
metadata.gz.sig CHANGED
Binary file