dev_hjm_a
cxt 5 years ago
parent 233caafd5d
commit d77ab21d54

@ -326,7 +326,7 @@ class MyshixunsController < ApplicationController
if edu_css.present? if edu_css.present?
css_path = edu_css.split(",") css_path = edu_css.split(",")
css_path.each do |path| css_path.each do |path|
file_content = GitService.file_content(repo_path: @repo_path, path: path)["content"] file_content = GitService.git_fle_content(repo_path: @repo_path, path: path)["content"]
file_content = tran_base64_decode64(file_content) unless file_content.blank? file_content = tran_base64_decode64(file_content) unless file_content.blank?
@contents = @contents.sub(/EDUCODERCSS/, "<style>#{file_content}</style>") @contents = @contents.sub(/EDUCODERCSS/, "<style>#{file_content}</style>")
end end
@ -335,7 +335,7 @@ class MyshixunsController < ApplicationController
if edu_js.present? if edu_js.present?
js_path = edu_js.split(",") js_path = edu_js.split(",")
js_path.each do |path| js_path.each do |path|
file_content = GitService.file_content(repo_path: @repo_path, path: path)["content"] file_content = GitService.git_fle_content(repo_path: @repo_path, path: path)["content"]
file_content = tran_base64_decode64(file_content) unless file_content.blank? file_content = tran_base64_decode64(file_content) unless file_content.blank?
@contents = @contents.sub(/EDUCODERJS/, "<script>#{file_content}</script>") @contents = @contents.sub(/EDUCODERJS/, "<script>#{file_content}</script>")
end end

Loading…
Cancel
Save