summaryrefslogtreecommitdiffstats
path: root/lib/redmine/wiki_formatting/common_mark
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2022-05-17 21:16:38 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2022-05-17 21:16:38 +0000
commitb5673a0522abf36c2635b80bbce41e28f3017d36 (patch)
tree0fd43296517c1c829cf78eb62354fb34c04028ca /lib/redmine/wiki_formatting/common_mark
parent10bf9045a1897c16e53b1825bceffb6dfb71acce (diff)
downloadredmine-b5673a0522abf36c2635b80bbce41e28f3017d36.tar.gz
redmine-b5673a0522abf36c2635b80bbce41e28f3017d36.zip
Fix Rubocop warnings.
git-svn-id: https://svn.redmine.org/redmine/trunk@21596 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/wiki_formatting/common_mark')
-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 4c25a7b13..2aab08aa1 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