forked from Gitlink/forgeplus
Merge branch 'develop' into standalone_develop
This commit is contained in:
commit
28dfce0247
|
@ -152,7 +152,6 @@ module RepositoriesHelper
|
|||
sources.each do |s|
|
||||
begin
|
||||
s_content = s[0]
|
||||
puts s_content
|
||||
# 链接直接跳过不做替换
|
||||
next if s_content.starts_with?('http://') || s_content.starts_with?('https://') || s_content.starts_with?('mailto:') || s_content.blank?
|
||||
ext = File.extname(s_content)[1..-1]
|
||||
|
@ -188,7 +187,7 @@ module RepositoriesHelper
|
|||
else
|
||||
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]
|
||||
s_content = s_content.split("#{Rails.root}")[1]
|
||||
case k.to_s
|
||||
when 'ss_src'
|
||||
content = content.gsub("src=\"#{s[0]}\"", "src=\"/#{s_content}\"")
|
||||
|
|
Loading…
Reference in New Issue