修复:readme报错去重

This commit is contained in:
yystopf 2024-06-06 08:34:54 +08:00
parent 2d113ff02a
commit 30a17f53b3
1 changed files with 4 additions and 2 deletions

View File

@ -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