From 30a17f53b3cb07cdf9b0c475b7d09d6b8c682460 Mon Sep 17 00:00:00 2001 From: yystopf Date: Thu, 6 Jun 2024 08:34:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9Areadme=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E5=8E=BB=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/repositories_helper.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 360f7d03..79e58346 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -210,11 +210,13 @@ module RepositoriesHelper end end - after_ss_souces = content.to_s.scan(s_regex) + after_ss_souces = content.to_s.scan(s_regex).uniq after_ss_souces.each_with_index do |s, index| content = content.gsub("#{s[0]}","#{total_sources[:ss][index][0]}") end - after_ss_c_souces = content.to_s.scan(s_regex_c) + after_ss_c_souces = content.to_s.scan(s_regex_c).uniq + puts after_ss_c_souces + puts total_sources after_ss_c_souces.each_with_index do |s, index| content = content.gsub("#{s[0]}","#{total_sources[:ss_c][index][0]}") end