wiki_md 0.5.0 → 0.5.1

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: 23d30c7bf1b6a100c37547aa1c5ff9e65b8c15cfb764672ed234d02193c63cf2
4
- data.tar.gz: aaa03a60bb5698f4973a1bc5482c05e351d23890e6a77c44569250e48ea49dd3
3
+ metadata.gz: 24055db3a607e496ebf1fcc893e33f991e1d75486316d2a958f02d46e1a3dbdc
4
+ data.tar.gz: 3aba3c95da99ed9e33c3926783f71cec416577778341a8d0fa3892defed5d638
5
5
  SHA512:
6
- metadata.gz: ad6a1590ee1f11d6572aadcfc6e3125b98a0fee494ccf89dbdb38e162a70ea5a3ba7d9425ce0106e7e8979d26b2407c2a8bb338f8606701fbd34f6d2bedf3917
7
- data.tar.gz: d955659c15fa48942c4c0cc5bffff1a4b9e1925957dc1f95ff1839ae6ef0ed20cde55f707b748cc4551463f63c2cbf32c8e8c60e579039304d42935cd270b306
6
+ metadata.gz: '08f2f40027d5b9a48655bf77430fbaa86acd4d8c5385598df3ccf50d0eabc8b1a4862091cee89c717a8f238c42a7815f2787a7363a5e94108b4b4a714e3cf3f7'
7
+ data.tar.gz: e0238ead3d46cb154a63c844ea9f89505b9daf6b0b68d63dbd782eee8134deb669c4084545c4a31774f621c5acb5ab4c8792acf628b1bc9bc380593ef4830f21
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/wiki_md.rb CHANGED
@@ -119,18 +119,20 @@ class WikiMd
119
119
 
120
120
  end
121
121
 
122
+
122
123
  def find(q)
123
124
 
124
125
  puts ('WikiMd::find q: ' + q.inspect).debug if @debug
125
126
  return @dxsx.dx.find q if q =~ /^\d+$/
126
-
127
+ regex = q.is_a?(String) ? /#{q}/i : q
128
+ r = @dxsx.dx.all.find {|section| section.x.lines.first =~ regex }
127
129
  puts (' r: ' + r.inspect).debug if @debug
128
130
  return unless r
129
131
 
130
132
  heading2 = r.x.lines.last[/(?<=redirect ).*/]
131
133
  heading2 ? find(heading2) : r
132
134
 
133
- end
135
+ end
134
136
 
135
137
  def find_tag(tag)
136
138
  @dxtags.find tag
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wiki_md
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file