mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
修复
This commit is contained in:
@@ -133,7 +133,7 @@ module RepositoriesHelper
|
||||
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?filepath=#{s_content}&ref=#{ref}"].join
|
||||
case k
|
||||
case k.to_s
|
||||
when 'ss_src'
|
||||
content = content.gsub("src=\"#{s[0]}\"", "src=\"#{s_content}\"")
|
||||
when 'ss_src_1'
|
||||
@@ -145,7 +145,7 @@ module RepositoriesHelper
|
||||
path = [owner&.login, repo&.identifier, 'tree', ref, file_path].join("/")
|
||||
s_content = File.expand_path(s_content, path)
|
||||
s_content = s_content.split("#{Rails.root}/")[1]
|
||||
case k
|
||||
case k.to_s
|
||||
when 'ss_src'
|
||||
content = content.gsub("src=\"#{s[0]}\"", "src=\"/#{s_content}\"")
|
||||
when 'ss_src_1'
|
||||
|
||||
Reference in New Issue
Block a user