]> source.dussan.org Git - redmine.git/commitdiff
Fix Rubocop warnings.
authorMarius Balteanu <marius.balteanu@zitec.com>
Tue, 17 May 2022 21:16:38 +0000 (21:16 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Tue, 17 May 2022 21:16:38 +0000 (21:16 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@21596 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/wiki_formatting/common_mark/external_links_filter.rb
test/system/inline_autocomplete_test.rb

index 4c25a7b133981679fb096a4b58712dcbaaeb0ace..2aab08aa1262f0f2fce0b999c06e476e5fe124a7 100644 (file)
@@ -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
index 0490c69471e6d35cc3537129e79234f85f036282..fd0ac7a22155a3146e1caa3b943673b09f30a1dd 100644 (file)
@@ -185,6 +185,5 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase
     within('.tribute-container') do
       assert page.has_text? "Dave Lopper"
     end
-
   end
 end