Browse Source

更改:readme特殊处理斜杠

pull/347/head
yystopf 2 years ago
parent
commit
c6ae30f2cd
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      app/helpers/repositories_helper.rb

+ 1
- 0
app/helpers/repositories_helper.rb View File

@@ -157,6 +157,7 @@ module RepositoriesHelper
ext = File.extname(s_content)[1..-1]
ext = ext.split("?")[0] if ext.include?("?")
if (image_type?(ext) || download_type(ext)) && !ext.blank?
s_content = s_content.starts_with?("/") ? s_content[1..-1] : s_content[0..-1]
s_content = File.expand_path(s_content, file_path)
s_content = s_content.split("#{Rails.root}/")[1]
# content = content.gsub(s[0], "/#{s_content}")


Loading…
Cancel
Save