xpath-simplify 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/xpath-simplify.rb +2 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46d94d752dd48ddc126c652b376d3566480a9e0e
4
- data.tar.gz: 007308d37864fa729a274a3271c10cd1ff9da418
3
+ metadata.gz: 3e57744bdf14e40d03de200fa9f186782f053475
4
+ data.tar.gz: 7505e37d660bd64e8c3bd23d7adf42490626cf6d
5
5
  SHA512:
6
- metadata.gz: b9b1b496ef055d5a0c753937f5b41636067cdb1297112084caefe486cd7ab98591772e5ab8c934e3acc1b3c4d1d1628f36356af4647f60db6f318209191bbf05
7
- data.tar.gz: 3d40c85ba03a956f8513f0c7e5a143d7520f5b509cd0512850e59210ec31558fb8c030ac4433e3bc7bc1539e606a1e532216d1ddd86236cd4581ed4ba0615726
6
+ metadata.gz: 7f932863d096b04f5def7c84a614987f3aafdbe3d7787a88ae7d5920e5cbd8162b7d235ee397673cda8dc8e710b935a1a7379d8dce9b760ea9cf68e5291676d0
7
+ data.tar.gz: ca8d58f534a094ea428300633a29d8d58e1fa5bfbcb00e33d52d9177064046eaf63ad8f95c085e7d09c130851557fc118b79bb6ddacc557a056bd2c692741cc5
@@ -6,7 +6,7 @@ class XPathSimplify
6
6
  end
7
7
 
8
8
  def self.assemble(arr)
9
- return "//*[contains(text(),\"#{arr.join(' ')}\")]" if check_only_text(arr)
9
+ return "//*[contains(normalize-space(),\"#{arr.join(' ')}\")]" if check_only_text(arr)
10
10
  arr.each_with_index do |a,i|
11
11
  case a
12
12
  when '((', '))', '->', '>>', '&&', '||', '::' then next
@@ -55,7 +55,7 @@ class XPathSimplify
55
55
  arr[i] = nil
56
56
  else
57
57
  f_text = i
58
- arr[i] = "//*[contains(text(),\""
58
+ arr[i] = "//*[contains(normalize-space(),\""
59
59
  end
60
60
  else
61
61
  if f_text != -1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xpath-simplify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Mackie