summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-03-03 22:38:03 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-03-03 22:38:03 +0000
commit98aafd06bacea24fbccef0b1f3a20c53067513d3 (patch)
tree66e4987aca7ce6e2c8ce5117a0aa89c9e91466f2 /lib
parent193bf7db65fb9b4432a98613831fafbda1766ca0 (diff)
downloadredmine-98aafd06bacea24fbccef0b1f3a20c53067513d3.tar.gz
redmine-98aafd06bacea24fbccef0b1f3a20c53067513d3.zip
Fix rubocop warnings on 5.0-stable branch.
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@22763 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/wiki_formatting/common_mark/external_links_filter.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/redmine/wiki_formatting/common_mark/external_links_filter.rb b/lib/redmine/wiki_formatting/common_mark/external_links_filter.rb
index 2928fb990..5fd31091b 100644
--- a/lib/redmine/wiki_formatting/common_mark/external_links_filter.rb
+++ b/lib/redmine/wiki_formatting/common_mark/external_links_filter.rb
@@ -31,7 +31,11 @@ module Redmine
next unless url
next if url.starts_with?("/") || url.starts_with?("#") || !url.include?(':')
- scheme = URI.parse(url).scheme rescue nil
+ scheme = begin
+ URI.parse(url).scheme
+ rescue
+ nil
+ end
next if scheme.blank?
klass = node["class"].presence