From b5673a0522abf36c2635b80bbce41e28f3017d36 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Tue, 17 May 2022 21:16:38 +0000 Subject: [PATCH] Fix Rubocop warnings. git-svn-id: https://svn.redmine.org/redmine/trunk@21596 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../wiki_formatting/common_mark/external_links_filter.rb | 6 +++++- test/system/inline_autocomplete_test.rb | 1 - 2 files changed, 5 insertions(+), 2 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 diff --git a/test/system/inline_autocomplete_test.rb b/test/system/inline_autocomplete_test.rb index 0490c6947..fd0ac7a22 100644 --- a/test/system/inline_autocomplete_test.rb +++ b/test/system/inline_autocomplete_test.rb @@ -185,6 +185,5 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase within('.tribute-container') do assert page.has_text? "Dave Lopper" end - end end -- 2.39.5