flnews_post_proc 1.44 → 1.45

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/body.rb +7 -2
  3. data/lib/version.rb +2 -2
  4. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd6a768ede3aff691558eba80a8a4b63df2ee0a9ca06e9c5686d71d3512dd29d
4
- data.tar.gz: c068b97b1648e39f7ed02d774f301157e69cf065702556605acf777ab40782db
3
+ metadata.gz: c48262d6fc3031346ffa1e2b528e11a696cef83b6d7c64fa98cdef444cf60247
4
+ data.tar.gz: 12e53f1d88d613d14671ed06f03c0e65ca5f438088c85a66c22d3e37beec9b61
5
5
  SHA512:
6
- metadata.gz: c01e7ed3b8174bc4707b9b00842c684f9b0c389551a7a66ec5f95ccd3fbf775bd9e8bd34e700e9a5cedf07bc826fec7d7d7b7c62324222e2fcf217637226a955
7
- data.tar.gz: 51704cb9e8bb5c1967efc09fce01e60be87bc0e88af79542bb9aef31ed0cf7f92a9283d2e3850ac19330935e46613f4aad1f506d89acf21248d92b21bdfffaaa
6
+ metadata.gz: f1845950986bcb9919a4ad353c4913a9fca9427f2387bb8a4cbe7b1968eaf26f35d837f331dd9d3f9a1ab5c49b8e9a49d7868f89902c7b9f427d2592e73dc607
7
+ data.tar.gz: f87ff6d5bd9462ebf3988b23482b64d6bb3d7ced99fbeecb06cc6c271392b65b7d8a510cd69e7e83c6792775ffbceb6e6dc1a6313b0bb2abd335752f508655ba
data/lib/body.rb CHANGED
@@ -232,8 +232,12 @@ class Body
232
232
  debug('handle http')
233
233
  l_array = l.split
234
234
  url_strs = l_array.collect do |ele|
235
- if ele.strip.include?('http') && ele.match(/https?:/)
236
- ele.strip
235
+ if ele.strip.include?('http') && ele.match(/https?:\S+/)
236
+ ele.lstrip!
237
+ while !ele.match(/([[:alnum:]]|>)$/) do
238
+ ele.chop!
239
+ end
240
+ ele
237
241
  end
238
242
  end.compact
239
243
  debug('url_strs: ' << url_strs.to_s)
@@ -260,6 +264,7 @@ class Body
260
264
  match = nstr.match(/\<?(https?:\/\/[^\>]*)\>?/)
261
265
  # get the darned URL already!
262
266
  url = match[1] if match
267
+ debug 'url is ' << url
263
268
  # nstr = with_angular_brackets(nstr, url)
264
269
  l.sub!(str, nstr)
265
270
  rescue Exception => ex
data/lib/version.rb CHANGED
@@ -14,8 +14,8 @@
14
14
  =end
15
15
 
16
16
  PROGNAME = 'flnews_post_proc'
17
- PROGVERSION = "1.44"
17
+ PROGVERSION = "1.45"
18
18
  AUTHORS = "Michael Uplawski"
19
19
  EMAIL = "michael.uplawski@uplawski.eu"
20
20
  YEARS = "2023 - 2024"
21
- SUMMARY = "Bugfix: Strings http and https without following colon are not interpreted as links"
21
+ SUMMARY = "Bugfix: URLs exclude punctuation and others at the end."
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flnews_post_proc
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.44'
4
+ version: '1.45'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Uplawski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-10 00:00:00.000000000 Z
11
+ date: 2024-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diffy
@@ -85,6 +85,5 @@ requirements: []
85
85
  rubygems_version: 3.4.20
86
86
  signing_key:
87
87
  specification_version: 4
88
- summary: 'Bugfix: Strings http and https without following colon are not interpreted
89
- as links'
88
+ summary: 'Bugfix: URLs exclude punctuation and others at the end.'
90
89
  test_files: []