pxindex 0.2.1 → 0.2.2

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: 9e8b4df7ff1521ad0cc9feae7ccd38f243ea8d964e82118a8d69ef1e5d747882
4
- data.tar.gz: 995a8f24c9ff2f2461eff8ac12a313ad91b29234fcec8f052a8f2acd98fdef67
3
+ metadata.gz: 734c93bfeb579db8039881909574a503747336f34ba3a66ceca7a89441e0b4ca
4
+ data.tar.gz: a940f38f6d511ed008328a0b314d9c41915af8e20705a2f167abe5b272a52235
5
5
  SHA512:
6
- metadata.gz: d320fe09c8a07b229f96a2df82feb24a78e19c89f24b94d1de88f7b0dba327318f916526673b3d0b811af4e8501ddc0f2540f77678e5361f160c2854ddacb39c
7
- data.tar.gz: 5d118fe4a3afbfdebeeec100b657350ac6da61ca9a9f12a1be2a4839d21fd47e1d2e8f4ccb24268ce0fae855e7bb7ba8ba30c5640ce7b90aa2ff0bc62df56762
6
+ metadata.gz: d52628ae2564c1757d29fa6f6c258d4baf7941d3350d6539a416636b2caae61b432d8edd067690541f059afb0910ac26fa0e85f65a9477eb2ee341181db74534
7
+ data.tar.gz: e9b3486ce29f3961e547f656f242cd96dbd1ba63061d92595e88c830b8c2d895092bd57734c678eb266de802330176abc2968d20bc16fdff240d4b8105d5d037
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -2,6 +2,7 @@
2
2
 
3
3
  # file: pxindex.rb
4
4
 
5
+ require 'nokogiri'
5
6
  require 'pxindex-builder'
6
7
  require 'polyrex-headings'
7
8
 
@@ -68,7 +69,6 @@ class PxIndex
68
69
  alias query q?
69
70
 
70
71
  def build_html()
71
-
72
72
 
73
73
  @px.each_recursive do |x, parent|
74
74
 
@@ -93,7 +93,17 @@ class PxIndex
93
93
 
94
94
  href = e.attributes[:href]
95
95
  if href.empty? or href[0] == '!' then
96
- yield(e)
96
+
97
+ if block_given? then
98
+
99
+ yield(e)
100
+
101
+ else
102
+
103
+ e.attributes[:href] = '#' + e.attributes[:trail].split('/')\
104
+ .last.downcase
105
+
106
+ end
97
107
  end
98
108
  end
99
109
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pxindex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -30,8 +30,28 @@ cert_chain:
30
30
  IIkRAfg3vUhmtNQu26Gsi9aZcJAGPKIjdRuYc9oyiGpJv0cQ02HBGRUXnoKS7XYT
31
31
  QDc=
32
32
  -----END CERTIFICATE-----
33
- date: 2019-01-16 00:00:00.000000000 Z
33
+ date: 2019-01-17 00:00:00.000000000 Z
34
34
  dependencies:
35
+ - !ruby/object:Gem::Dependency
36
+ name: nokogiri
37
+ requirement: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '1.10'
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 1.10.1s
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - "~>"
50
+ - !ruby/object:Gem::Version
51
+ version: '1.10'
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 1.10.1s
35
55
  - !ruby/object:Gem::Dependency
36
56
  name: pxindex-builder
37
57
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file