From ebc9ceb4f9aaf21928d9488ce988d26264be4da2 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 5 Mar 2026 00:14:41 +0000 Subject: [PATCH] Fix new rubocop warning --- lib/rich_text.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rich_text.rb b/lib/rich_text.rb index 5464edb17..28c88c78e 100644 --- a/lib/rich_text.rb +++ b/lib/rich_text.rb @@ -111,7 +111,7 @@ module RichText .flat_map do |rule| expanded_path = "#{rule.host || "#{Settings.server_protocol}://#{Settings.server_url}"}/#{rule.path_template}" rule.patterns - .select { |pattern| pattern.is_a?(String) } + .grep(String) .map { |pattern| [Regexp.new("(?<=^|#{URL_UNSAFE_CHARS})#{pattern}", Regexp::IGNORECASE, :timeout => 0.05), expanded_path] } end end -- 2.47.3