|
|
|
@ -260,12 +260,12 @@ class MyshixunsController < ApplicationController
|
|
|
|
|
unless @hide_code
|
|
|
|
|
# 远程版本库文件内容
|
|
|
|
|
last_content = GitService.file_content(repo_path: @repo_path, path: path)["content"]
|
|
|
|
|
|
|
|
|
|
content = if @myshixun.mirror_name.select{|a| a.include?("MachineLearning") || a.include?("Python")}.present? && params[:content].present?
|
|
|
|
|
params[:content].gsub(/\t/, ' ')
|
|
|
|
|
else
|
|
|
|
|
params[:content]
|
|
|
|
|
end
|
|
|
|
|
content = params[:content]
|
|
|
|
|
# content = if @myshixun.mirror_name.select{|a| a.include?("MachineLearning") || a.include?("Python")}.present? && params[:content].present?
|
|
|
|
|
# params[:content].gsub(/\t/, ' ')
|
|
|
|
|
# else
|
|
|
|
|
# params[:content]
|
|
|
|
|
# end
|
|
|
|
|
if content != last_content
|
|
|
|
|
@content_modified = 1
|
|
|
|
|
|
|
|
|
|