修复:readme

This commit is contained in:
yystopf 2024-06-07 10:40:36 +08:00
parent ace64f6071
commit 756e308e06
1 changed files with 5 additions and 4 deletions

View File

@ -147,6 +147,7 @@ module RepositoriesHelper
ss_href = content.to_s.scan(href_regex)
ss_href_1 = content.to_s.scan(href_regex_1)
total_sources = {ss_c: ss_c,ss: ss, ss_1: ss_1, ss_2: ss_2, ss_src: ss_src, ss_src_1: ss_src_1, ss_src_2: ss_src_2, ss_src_3: ss_src_3, ss_src_4: ss_src_4, ss_src_5: ss_src_5, ss_href: ss_href, ss_href_1: ss_href_1}
puts total_sources
# total_sources.uniq!
total_sources.except(:ss, :ss_c).each do |k, sources|
sources.each do |s|
@ -210,14 +211,14 @@ module RepositoriesHelper
end
end
after_ss_souces = content.to_s.scan(s_regex).uniq
after_ss_souces = content.to_s.scan(s_regex)#.uniq
after_ss_souces.each_with_index do |s, index|
next if total_sources[:ss][index].nil?
content = content.gsub("#{s[0]}","#{total_sources[:ss][index][0]}")
end
after_ss_c_souces = content.to_s.scan(s_regex_c).uniq
puts after_ss_c_souces
puts total_sources
after_ss_c_souces = content.to_s.scan(s_regex_c)#.uniq
after_ss_c_souces.each_with_index do |s, index|
next if total_sources[:ss_c][index].nil?
content = content.gsub("#{s[0]}","#{total_sources[:ss_c][index][0]}")
end
return content