searchlink 2.3.70 → 2.3.71

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: 94434b4c63f4188ca00e93ad4c2be7765b61a2fdbccd3b7e706482bf1e09b618
4
- data.tar.gz: 4af48f283d1a693bed323cdbbb91121ee5b4616225d4ecef46f80302016227ff
3
+ metadata.gz: 55880b0891d029bf3dde58968a5b55c4cb302b14ceecd8e5f279338abc070895
4
+ data.tar.gz: 7ea4da442f494ce7c956d9510f7eb20f295de133d91d7abe538c380bfd7b4d79
5
5
  SHA512:
6
- metadata.gz: 3fa2094dbbf341680baefae73f98aba890ace10c6f6d44198b7902c28810b9e3cc8121199b9ba26a1da0243dcf779c3f018ebaaa6f1e794456d72106fafe5ad6
7
- data.tar.gz: 7a39a40fbc8e8466c3652e236eee03091b027dd83aebd481b31dcb3acaa3a53124d362887d4cbe33bc22699fadd4e7adfe40f4f40db48cb8f69754584d84ae70
6
+ metadata.gz: 61efe73ac610acaea6d949186358bb863df9ff10d9fd0698f6b5510c3128c4833e2904347deccdb335573e1dcc4793739ae801150e97ba4bbf1e0ade8544d979
7
+ data.tar.gz: 0dc5b9f05b691833a8a515f186513a4ee7c281d8358e81f1abdaf1f7412d855480ce8d34f4bbfd383682d811eeb016fbb1868cd6ff165b5cca36afd50eaea87b
@@ -424,6 +424,14 @@ module SL
424
424
  @url, title, @link_text = do_search(search_type, search_terms, @link_text, @search_count)
425
425
  end
426
426
 
427
+ if (@link_text == '' || @link_text == '%') && @url
428
+ if title
429
+ @link_text = title
430
+ else
431
+ add_title(@url)
432
+ end
433
+ end
434
+
427
435
  if @url
428
436
  title = SL::URL.title(@url) if SL.titleize && title == ''
429
437
 
@@ -68,7 +68,7 @@ module SL
68
68
  end
69
69
 
70
70
  def find_script(script)
71
- return script if File.exist?(File.expand_path(script))
71
+ return File.expand_path(script) if File.exist?(File.expand_path(script))
72
72
 
73
73
  base = File.expand_path('~/.config/searchlink/plugins')
74
74
  first = File.join(base, script)
@@ -145,6 +145,7 @@ module SL
145
145
  Dir.glob(File.join(plugins_folder, '**/*.{json,yml,yaml}')).each do |file|
146
146
  ext = File.extname(file).sub(/^\./, '')
147
147
  config = IO.read(file)
148
+
148
149
  cfg = case ext
149
150
  when /^y/i
150
151
  YAML.safe_load(config)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SL
4
- VERSION = '2.3.70'
4
+ VERSION = '2.3.71'
5
5
  end
6
6
 
7
7
  # Main module
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: searchlink
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.70
4
+ version: 2.3.71
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-10 00:00:00.000000000 Z
11
+ date: 2024-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler