fixed readme中图片链接问号处理2
This commit is contained in:
parent
fca25ff482
commit
328c5c3561
|
@ -141,8 +141,8 @@ module RepositoriesHelper
|
|||
s_content = File.expand_path(s_content, file_path)
|
||||
s_content = s_content.split("#{Rails.root}/")[1]
|
||||
# content = content.gsub(s[0], "/#{s_content}")
|
||||
s_content = [base_url, "/api/#{owner&.login}/#{repo.identifier}/raw/#{s_content}?ref=#{ref}"].join
|
||||
s_content = [base_url, "/api/#{owner&.login}/#{repo.identifier}/raw/#{s_content}&ref=#{ref}"].join if s_content.include?("?")
|
||||
join_xxx = s_content.include?("?") ? "&" : "?"
|
||||
s_content = [base_url, "/api/#{owner&.login}/#{repo.identifier}/raw/#{s_content}#{join_xxx}ref=#{ref}"].join
|
||||
case k.to_s
|
||||
when 'ss_src'
|
||||
content = content.gsub("src=\"#{s[0]}\"", "src=\"#{s_content}\"")
|
||||
|
|
Loading…
Reference in New Issue