diff --git a/app/controllers/concerns/git_common.rb b/app/controllers/concerns/git_common.rb index 452204419..1752df7cb 100644 --- a/app/controllers/concerns/git_common.rb +++ b/app/controllers/concerns/git_common.rb @@ -10,7 +10,6 @@ module GitCommon # ------------------------ # 版本库目录结构 def repository - logger.info("ssssssseeeeeeee#{params}") begin @repo_url = repo_url @repo_path @trees = GitService.file_tree(repo_path: @repo_path, path: @path) @@ -44,4 +43,16 @@ module GitCommon end end + # 为版本库添加文件 + def add_file + @path, message, content = params[:path].strip, params[:message], params[:content] + author_name, author_email = current_user.real_name, current_user.current_user.git_mail + @content = GitService.update_file(repo_path: @repo_path, + file_path: path, + message: message, + content: content, + author_name: author_name, + author_email: author_email) + end + end \ No newline at end of file diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 59b0d7e41..fb68f23bf 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -890,7 +890,7 @@ class CoursesController < ApplicationController name = worksheet.cell(row, 1).to_s if @course.course_groups.where(:name => name).blank? - @course.course_groups << CourseGroup.new(:name => name) + @course.course_groups << CourseGroup.new(:name => name, :position => @course.course_groups_count + 1) group_count += 1 end end diff --git a/app/controllers/exercise_questions_controller.rb b/app/controllers/exercise_questions_controller.rb index e6f17778a..dccdae809 100644 --- a/app/controllers/exercise_questions_controller.rb +++ b/app/controllers/exercise_questions_controller.rb @@ -680,8 +680,9 @@ class ExerciseQuestionsController < ApplicationController normal_status(-1,"已发布/已截止,不允许增删答案!") elsif standard_answer.present? if @exercise_question.question_type == Exercise::COMPLETION - exercise_answers_text = standard_answer.map{|a| a[:answer_text]}.sum.uniq - unless (standard_answer.count == exercise_choice_ids.count) && (standard_answers_text.count == exercise_answers_text.count) + # exercise_answers_text = standard_answer.map{|a| a[:answer_text]}.sum.uniq + # unless (standard_answer.count == exercise_choice_ids.count) && (standard_answers_text.count == exercise_answers_text.count) + unless standard_answer.count == exercise_choice_ids.count normal_status(-1,"已发布/已截止,不允许增删标准答案!") end elsif @exercise_question.question_type == Exercise::SUBJECTIVE diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 0064914d3..89b6dca27 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -392,59 +392,6 @@ class GamesController < ApplicationController end end - # # 文件更新;数据评测记录 - # # 生成重新评测认证码 - # # content_modified:0 表示文件没有更新;content_modified:1 表示文件有更新 - # def file_update - # path = params[:path].strip unless params[:path].blank? - # myshixun = @game.myshixun - # rev = params[:rev] ? params[:rev] : "master" - # @content_modified = 0 - # # params[:evaluate] 实训评测时更新必须给的参数,需要依据该参数做性能统计,其它类型的更新可以跳过 - # # 自动保存的时候evaluate为0;点评测的时候为1 - # if params[:evaluate] == 1 - # record = EvaluateRecord.create!(:user_id => current_user.id, :shixun_id => myshixun.shixun_id, :game_id => @game.id) - # uid_logger("-- game is #{@game.id}, record id is #{record.id}, time is **** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}") - # student_work_time = format("%.3f", (Time.now.to_f - record.created_at.to_f)).to_f - # record.update_attributes!(:student_work => student_work_time) - # end - # # 远程版本库文件内容 - # last_content = GitService.file_content(repo_path: @repo_path, path: path)["content"] - # last_content = tran_base64_decode64(last_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 - # code_file = @g.edit_file(myshixun.gpid, current_user.login, :content => content, :file_path => path, - # :branch_name => rev, :commit_message => params[:evaluate] == 0 ? "auto commit" : "task commit") - # uid_logger("-- file update #{code_file}") - # # REDO:更新失败的处理 - # raise("文件更新失败") unless code_file - # end - # - # if record.present? - # consume_time = format("%.3f", (Time.now.to_f - record.created_at.to_f)).to_f - # record.update_attributes!(:file_update => consume_time) - # end - # - # # status为2说明是重新评测 - # if @game.status == 2 - # code = CODES.sample(8).join - # @resubmit = "#{code}_#{@myshixun.id}" - # end - # - # if content != last_content && code_file.blank? - # raise("实训平台繁忙(繁忙等级:81),请稍后刷新并重试") - # end - # rescue Exception => e - # uid_logger("-- file update failed #{e.message}") - # raise Educoder::TipException.new("#{e.message}") - # end - # 恢复初始代码 # 注意path为当前打开文件的path def reset_original_code diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index 0f301dd4f..bc549cf1d 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -901,9 +901,9 @@ class PollsController < ApplicationController error_question = [] @poll_multi_questions.each do |q| poll_user_votes = current_user.poll_votes.where(poll_question_id:q.id)&.size - if q.max_choices.present? && (poll_user_votes > q.max_choices) + if q.max_choices.present? && (q.max_choices > 0) && (poll_user_votes > q.max_choices) error_messages = "第#{q.question_number}题:超过最大选项限制" - elsif q.min_choices.present? && (poll_user_votes < q.min_choices) + elsif q.min_choices.present? && (q.min_choices > 0)&& (poll_user_votes < q.min_choices) error_messages = "第#{q.question_number}题:不得少于最小选项限制" else error_messages = nil @@ -936,7 +936,7 @@ class PollsController < ApplicationController def commit_result ActiveRecord::Base.transaction do begin - @poll_users = @poll.all_poll_users(current_user.id) + @poll_users = @poll.all_poll_users(current_user.id).where(commit_status:1) # 问卷已提交的用户 @poll_commit_ids = @poll_users.commit_by_status(1).pluck(:user_id) #问卷提交用户的id @page = params[:page] || 1 @limit = params[:limit] || 10 diff --git a/app/controllers/question_banks_controller.rb b/app/controllers/question_banks_controller.rb index 96fcbeace..00fea5f3e 100644 --- a/app/controllers/question_banks_controller.rb +++ b/app/controllers/question_banks_controller.rb @@ -1,6 +1,7 @@ class QuestionBanksController < ApplicationController before_action :require_login, :check_auth before_action :params_filter, except: [:my_courses] + before_action :teacher_or_admin, except: [:bank_list] # 题库选用列表 # object_type: # normal 普通作业题库; group 分组作业题库; poll问卷题库; exercise试卷题库; gtask 毕设选题题库;gtopic 毕设任务 @@ -81,24 +82,29 @@ class QuestionBanksController < ApplicationController def my_courses @courses = current_user.manage_courses.where(is_delete: 0, is_end: 0) + unless params[:search].blank? + @courses = @courses.where("name like ?", "%#{params[:search].strip}%") + end end def send_to_course - bank = current_bank - course = current_user.manage_courses.find_by(id: params[:course_id]) - case @object_type - when 'HomeworkBank' # 作业 - quote_homework_bank bank, course - when 'ExerciseBank' - if bank.container_type == 'Exercise' # 试卷 - quote_exercise_bank bank, course - else # 问卷 - quote_poll_bank bank, course + banks = object_banks + course = current_user.manage_courses.find_by!(id: params[:course_id]) + banks.each do |bank| + case @object_type + when 'HomeworkBank' # 作业 + quote_homework_bank bank, course + when 'ExerciseBank' + if bank.container_type == 'Exercise' # 试卷 + quote_exercise_bank bank, course + else # 问卷 + quote_poll_bank bank, course + end + when 'GtaskBank' + quote_gtask_bank bank, course + when 'GtopicBank' + quote_gtopic_bank bank, course end - when 'GtaskBank' - quote_gtask_bank bank, course - when 'GtopicBank' - quote_gtopic_bank bank, course end normal_status("发送成功") end @@ -106,7 +112,7 @@ class QuestionBanksController < ApplicationController def destroy bank = current_bank - unless user.admin? || bank.user_id == user.id + unless current_user.admin? || bank.user_id == current_user.id render_forbidden return end @@ -121,11 +127,32 @@ class QuestionBanksController < ApplicationController render_ok end + def multi_delete + @objects = object_banks + @objects.destroy_all + normal_status("删除成功") + end + + def multi_public + @objects = object_banks + @objects.update_all(is_public: true) + normal_status("更新成功") + end + private + def object_banks + banks ||= @object_type.classify.constantize.where(@object_filter).where(id: params[:object_id]) + unless current_user.admin? + banks = banks.where(user_id: current_user.id) + end + banks + end + def current_bank @_current_bank ||= @object_type.classify.constantize.where(@object_filter).find(params[:id]) end + def params_filter type = ["normal", "group", "poll", "exercise", "gtask", "gtopic"] tip_exception("object_type类型不正确") unless type.include?(params[:object_type]) @@ -152,6 +179,10 @@ class QuestionBanksController < ApplicationController end end + def teacher_or_admin + tip_exception(403, "无权限操作") unless current_user.is_certification_teacher || current_user.admin? + end + def quote_homework_bank homework, course ActiveRecord::Base.transaction do # 复制作业的基本信息 diff --git a/app/controllers/users/question_banks_controller.rb b/app/controllers/users/question_banks_controller.rb index e966b67e9..1f51b701c 100644 --- a/app/controllers/users/question_banks_controller.rb +++ b/app/controllers/users/question_banks_controller.rb @@ -18,8 +18,8 @@ class Users::QuestionBanksController < Users::BaseController def load_question_banks_solve_count question_bank_ids = @question_banks.map(&:id) @solve_count_map = - case params[:category] - when 'common', 'group' then + case params[:object_type] + when 'normal', 'group' then StudentWork.where(is_delete: false, work_status: [1, 2, 3]).joins(:homework_common) .where(homework_commons: { homework_bank_id: question_bank_ids }) .group('homework_commons.homework_bank_id').count @@ -42,14 +42,14 @@ class Users::QuestionBanksController < Users::BaseController end def query_params - params.permit(:type, :category, :course_list_id, :sort_by, :sort_direction) + params.permit(:type, :object_type, :course_list_id, :sort_by, :sort_direction) end def check_query_params! params[:type] = 'personal' if params[:type].blank? || !%w(personal publicly).include?(params[:type]) - if params[:category].blank? || !%w(common group exercise poll gtask gtopic).include?(params[:category]) - params[:category] = 'common' + if params[:object_type].blank? || !%w(normal group exercise poll gtask gtopic).include?(params[:object_type]) + params[:object_type] = 'normal' end if params[:sort_by].blank? || !%w(updated_at name contributor).include?(params[:sort_by]) diff --git a/app/services/users/question_bank_service.rb b/app/services/users/question_bank_service.rb index b17073a4f..7e640c6a5 100644 --- a/app/services/users/question_bank_service.rb +++ b/app/services/users/question_bank_service.rb @@ -22,8 +22,8 @@ class Users::QuestionBankService course_lists = CourseList.joins(relation_name).where.not(relation_name => { id: nil }) category_condition = - case params[:category] - when 'common' then { homework_type: 1 } + case params[:object_type] + when 'normal' then { homework_type: 1 } when 'group' then { homework_type: 3 } when 'exercise' then { container_type: 'Exercise' } when 'poll' then { container_type: 'Poll' } @@ -47,8 +47,8 @@ class Users::QuestionBankService def class_name @_class_name ||= begin - case params[:category] - when 'common', 'group' then 'HomeworkBank' + case params[:object_type] + when 'normal', 'group' then 'HomeworkBank' when 'exercise', 'poll' then 'ExerciseBank' when 'gtask' then 'GtaskBank' when 'gtopic' then 'GtopicBank' @@ -58,8 +58,8 @@ class Users::QuestionBankService end def category_filter(relations) - case params[:category] - when 'common' then + case params[:object_type] + when 'normal' then relations.where(homework_type: 1) when 'group' then relations.where(homework_type: 3) diff --git a/app/views/admins/shixun_settings/shared/_td.html.erb b/app/views/admins/shixun_settings/shared/_td.html.erb index 8523b682b..931ad11ac 100644 --- a/app/views/admins/shixun_settings/shared/_td.html.erb +++ b/app/views/admins/shixun_settings/shared/_td.html.erb @@ -17,15 +17,16 @@ + -- - - <%= File.exist?(disk_filename("Shixun",shixun.id)) ? "重新上传" : "上传图片" %> - - <% if File.exist?(disk_filename("Shixun",shixun.id)) %> - <%= image_tag(url_to_avatar(shixun), :class => "w80 h80 fl ml5 shixun_image_show", :id => "shixun_image_show_#{shixun.id}") %> - <% else %> - - <% end %> + + <%#= File.exist?(disk_filename("Shixun",shixun.id)) ? "重新上传" : "上传图片" %> + + <%# if File.exist?(disk_filename("Shixun",shixun.id)) %> + <%#= image_tag(url_to_avatar(shixun), :class => "w80 h80 fl ml5 shixun_image_show", :id => "shixun_image_show_#{shixun.id}") %> + <%# else %> + + <%# end %> <%= link_to shixun.owner.try(:show_real_name),"/users/#{shixun.owner.login}",target:'_blank' %> diff --git a/app/views/exercises/start_answer.json.jbuilder b/app/views/exercises/start_answer.json.jbuilder index 53336bf6f..01b730c76 100644 --- a/app/views/exercises/start_answer.json.jbuilder +++ b/app/views/exercises/start_answer.json.jbuilder @@ -31,6 +31,11 @@ else json.question_status @question_status end +exercise_type = 3 +if @t_user_exercise_status == 3 && @exercise.answer_open + exercise_type = 4 +end + json.partial! "exercises/exercise_scores" json.exercise_questions do @@ -57,7 +62,7 @@ json.exercise_questions do shixun_challenges: question.exercise_shixun_challenges, user_answer: question_info[:answered_content], choices:question.exercise_choices, - exercise_type:3, + exercise_type:exercise_type, shixun_type:question_info[:shixun_type], ques_position: q[:ques_number], edit_type:nil diff --git a/app/views/polls/commit_result.json.jbuilder b/app/views/polls/commit_result.json.jbuilder index 51f70afa2..795d609a7 100644 --- a/app/views/polls/commit_result.json.jbuilder +++ b/app/views/polls/commit_result.json.jbuilder @@ -14,7 +14,7 @@ if @poll_questions_count > 0 json.array! @poll_questions do |question| json.partial! "polls/commit_answers_result", question: question, answers:question.poll_answers, - question_votes:question.poll_votes #问题的全部答案 + question_votes:question.poll_votes.where(user_id:@poll_commit_ids) #问题的全部答案 end end else diff --git a/app/views/shixuns/add_file.json.jbuilder b/app/views/shixuns/add_file.json.jbuilder new file mode 100644 index 000000000..6f22dabc8 --- /dev/null +++ b/app/views/shixuns/add_file.json.jbuilder @@ -0,0 +1,2 @@ +json.content @content +json.path @path \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index ec366edec..a0aaa65cc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -632,6 +632,8 @@ Rails.application.routes.draw do post :save_banks get :my_courses post :send_to_course + delete :multi_delete + post :multi_public end end diff --git a/db/migrate/20190829084147_migrate_course_group_position.rb b/db/migrate/20190829084147_migrate_course_group_position.rb new file mode 100644 index 000000000..3a71baae4 --- /dev/null +++ b/db/migrate/20190829084147_migrate_course_group_position.rb @@ -0,0 +1,11 @@ +class MigrateCourseGroupPosition < ActiveRecord::Migration[5.2] + def change + Course.all.each do |course| + if course.course_groups.exists?(position: 0) + course.course_groups.each_with_index do |group, index| + group.update_attributes(position: index+1) + end + end + end + end +end diff --git a/public/assets/.sprockets-manifest-1c370772f16743f825981ab0e5c94237.json b/public/assets/.sprockets-manifest-1c370772f16743f825981ab0e5c94237.json index 1da7534f9..ef941726e 100644 --- a/public/assets/.sprockets-manifest-1c370772f16743f825981ab0e5c94237.json +++ b/public/assets/.sprockets-manifest-1c370772f16743f825981ab0e5c94237.json @@ -1 +1 @@ -{"files":{"admin-9bc01d92961108adb06739ae43d52928cbf41d383bf27a4ae2125ad232f2f16d.js":{"logical_path":"admin.js","mtime":"2019-08-29T10:56:46+08:00","size":1325003,"digest":"9bc01d92961108adb06739ae43d52928cbf41d383bf27a4ae2125ad232f2f16d","integrity":"sha256-m8AdkpYRCK2wZzmuQ9UpKMv0HTg78npK4hJa0jLy8W0="},"admin-96af063037e0babf25b1579d1c9d1e1901961d10a58ef3d41feb9e68feff348b.css":{"logical_path":"admin.css","mtime":"2019-08-29T10:56:46+08:00","size":640292,"digest":"96af063037e0babf25b1579d1c9d1e1901961d10a58ef3d41feb9e68feff348b","integrity":"sha256-lq8GMDfgur8lsVedHJ0eGQGWHRCljvPUH+ueaP7/NIs="},"font-awesome/fontawesome-webfont-7bfcab6db99d5cfbf1705ca0536ddc78585432cc5fa41bbd7ad0f009033b2979.eot":{"logical_path":"font-awesome/fontawesome-webfont.eot","mtime":"2019-08-23T09:13:14+08:00","size":165742,"digest":"7bfcab6db99d5cfbf1705ca0536ddc78585432cc5fa41bbd7ad0f009033b2979","integrity":"sha256-e/yrbbmdXPvxcFygU23ceFhUMsxfpBu9etDwCQM7KXk="},"font-awesome/fontawesome-webfont-2adefcbc041e7d18fcf2d417879dc5a09997aa64d675b7a3c4b6ce33da13f3fe.woff2":{"logical_path":"font-awesome/fontawesome-webfont.woff2","mtime":"2019-08-23T09:13:14+08:00","size":77160,"digest":"2adefcbc041e7d18fcf2d417879dc5a09997aa64d675b7a3c4b6ce33da13f3fe","integrity":"sha256-Kt78vAQefRj88tQXh53FoJmXqmTWdbejxLbOM9oT8/4="},"font-awesome/fontawesome-webfont-ba0c59deb5450f5cb41b3f93609ee2d0d995415877ddfa223e8a8a7533474f07.woff":{"logical_path":"font-awesome/fontawesome-webfont.woff","mtime":"2019-08-23T09:13:14+08:00","size":98024,"digest":"ba0c59deb5450f5cb41b3f93609ee2d0d995415877ddfa223e8a8a7533474f07","integrity":"sha256-ugxZ3rVFD1y0Gz+TYJ7i0NmVQVh33foiPoqKdTNHTwc="},"font-awesome/fontawesome-webfont-aa58f33f239a0fb02f5c7a6c45c043d7a9ac9a093335806694ecd6d4edc0d6a8.ttf":{"logical_path":"font-awesome/fontawesome-webfont.ttf","mtime":"2019-08-23T09:13:14+08:00","size":165548,"digest":"aa58f33f239a0fb02f5c7a6c45c043d7a9ac9a093335806694ecd6d4edc0d6a8","integrity":"sha256-qljzPyOaD7AvXHpsRcBD16msmgkzNYBmlOzW1O3A1qg="},"font-awesome/fontawesome-webfont-ad6157926c1622ba4e1d03d478f1541368524bfc46f51e42fe0d945f7ef323e4.svg":{"logical_path":"font-awesome/fontawesome-webfont.svg","mtime":"2019-08-23T09:13:14+08:00","size":444379,"digest":"ad6157926c1622ba4e1d03d478f1541368524bfc46f51e42fe0d945f7ef323e4","integrity":"sha256-rWFXkmwWIrpOHQPUePFUE2hSS/xG9R5C/g2UX37zI+Q="},"logo-7ff112568709bf97f9898fe87249b7a8f200ff1f48d537d85af87215f1870423.png":{"logical_path":"logo.png","mtime":"2019-08-23T10:44:25+08:00","size":2816,"digest":"7ff112568709bf97f9898fe87249b7a8f200ff1f48d537d85af87215f1870423","integrity":"sha256-f/ESVocJv5f5iY/ockm3qPIA/x9I1TfYWvhyFfGHBCM="},"application-761d0bb354d6008e853fd0b68663f5306c5035dcc0f500d6871025bcaefe0b13.js":{"logical_path":"application.js","mtime":"2019-08-29T10:56:46+08:00","size":1459545,"digest":"761d0bb354d6008e853fd0b68663f5306c5035dcc0f500d6871025bcaefe0b13","integrity":"sha256-dh0Ls1TWAI6FP9C2hmP1MGxQNdzA9QDWhxAlvK7+CxM="},"application-7e4c4f5e746a2d6a6fef715d6fc71005b3d8ab897e7b8fb7cb06419357bd60fe.css":{"logical_path":"application.css","mtime":"2019-08-29T10:56:46+08:00","size":1146039,"digest":"7e4c4f5e746a2d6a6fef715d6fc71005b3d8ab897e7b8fb7cb06419357bd60fe","integrity":"sha256-fkxPXnRqLWpv73Fdb8cQBbPYq4l+e4+3ywZBk1e9YP4="}},"assets":{"admin.js":"admin-9bc01d92961108adb06739ae43d52928cbf41d383bf27a4ae2125ad232f2f16d.js","admin.css":"admin-96af063037e0babf25b1579d1c9d1e1901961d10a58ef3d41feb9e68feff348b.css","font-awesome/fontawesome-webfont.eot":"font-awesome/fontawesome-webfont-7bfcab6db99d5cfbf1705ca0536ddc78585432cc5fa41bbd7ad0f009033b2979.eot","font-awesome/fontawesome-webfont.woff2":"font-awesome/fontawesome-webfont-2adefcbc041e7d18fcf2d417879dc5a09997aa64d675b7a3c4b6ce33da13f3fe.woff2","font-awesome/fontawesome-webfont.woff":"font-awesome/fontawesome-webfont-ba0c59deb5450f5cb41b3f93609ee2d0d995415877ddfa223e8a8a7533474f07.woff","font-awesome/fontawesome-webfont.ttf":"font-awesome/fontawesome-webfont-aa58f33f239a0fb02f5c7a6c45c043d7a9ac9a093335806694ecd6d4edc0d6a8.ttf","font-awesome/fontawesome-webfont.svg":"font-awesome/fontawesome-webfont-ad6157926c1622ba4e1d03d478f1541368524bfc46f51e42fe0d945f7ef323e4.svg","logo.png":"logo-7ff112568709bf97f9898fe87249b7a8f200ff1f48d537d85af87215f1870423.png","application.js":"application-761d0bb354d6008e853fd0b68663f5306c5035dcc0f500d6871025bcaefe0b13.js","application.css":"application-7e4c4f5e746a2d6a6fef715d6fc71005b3d8ab897e7b8fb7cb06419357bd60fe.css"}} \ No newline at end of file +{"files":{"admin-9bc01d92961108adb06739ae43d52928cbf41d383bf27a4ae2125ad232f2f16d.js":{"logical_path":"admin.js","mtime":"2019-08-29T10:56:46+08:00","size":1325003,"digest":"9bc01d92961108adb06739ae43d52928cbf41d383bf27a4ae2125ad232f2f16d","integrity":"sha256-m8AdkpYRCK2wZzmuQ9UpKMv0HTg78npK4hJa0jLy8W0="},"admin-96af063037e0babf25b1579d1c9d1e1901961d10a58ef3d41feb9e68feff348b.css":{"logical_path":"admin.css","mtime":"2019-08-29T10:56:46+08:00","size":640292,"digest":"96af063037e0babf25b1579d1c9d1e1901961d10a58ef3d41feb9e68feff348b","integrity":"sha256-lq8GMDfgur8lsVedHJ0eGQGWHRCljvPUH+ueaP7/NIs="},"font-awesome/fontawesome-webfont-7bfcab6db99d5cfbf1705ca0536ddc78585432cc5fa41bbd7ad0f009033b2979.eot":{"logical_path":"font-awesome/fontawesome-webfont.eot","mtime":"2019-08-23T09:13:14+08:00","size":165742,"digest":"7bfcab6db99d5cfbf1705ca0536ddc78585432cc5fa41bbd7ad0f009033b2979","integrity":"sha256-e/yrbbmdXPvxcFygU23ceFhUMsxfpBu9etDwCQM7KXk="},"font-awesome/fontawesome-webfont-2adefcbc041e7d18fcf2d417879dc5a09997aa64d675b7a3c4b6ce33da13f3fe.woff2":{"logical_path":"font-awesome/fontawesome-webfont.woff2","mtime":"2019-08-23T09:13:14+08:00","size":77160,"digest":"2adefcbc041e7d18fcf2d417879dc5a09997aa64d675b7a3c4b6ce33da13f3fe","integrity":"sha256-Kt78vAQefRj88tQXh53FoJmXqmTWdbejxLbOM9oT8/4="},"font-awesome/fontawesome-webfont-ba0c59deb5450f5cb41b3f93609ee2d0d995415877ddfa223e8a8a7533474f07.woff":{"logical_path":"font-awesome/fontawesome-webfont.woff","mtime":"2019-08-23T09:13:14+08:00","size":98024,"digest":"ba0c59deb5450f5cb41b3f93609ee2d0d995415877ddfa223e8a8a7533474f07","integrity":"sha256-ugxZ3rVFD1y0Gz+TYJ7i0NmVQVh33foiPoqKdTNHTwc="},"font-awesome/fontawesome-webfont-aa58f33f239a0fb02f5c7a6c45c043d7a9ac9a093335806694ecd6d4edc0d6a8.ttf":{"logical_path":"font-awesome/fontawesome-webfont.ttf","mtime":"2019-08-23T09:13:14+08:00","size":165548,"digest":"aa58f33f239a0fb02f5c7a6c45c043d7a9ac9a093335806694ecd6d4edc0d6a8","integrity":"sha256-qljzPyOaD7AvXHpsRcBD16msmgkzNYBmlOzW1O3A1qg="},"font-awesome/fontawesome-webfont-ad6157926c1622ba4e1d03d478f1541368524bfc46f51e42fe0d945f7ef323e4.svg":{"logical_path":"font-awesome/fontawesome-webfont.svg","mtime":"2019-08-23T09:13:14+08:00","size":444379,"digest":"ad6157926c1622ba4e1d03d478f1541368524bfc46f51e42fe0d945f7ef323e4","integrity":"sha256-rWFXkmwWIrpOHQPUePFUE2hSS/xG9R5C/g2UX37zI+Q="},"logo-7ff112568709bf97f9898fe87249b7a8f200ff1f48d537d85af87215f1870423.png":{"logical_path":"logo.png","mtime":"2019-08-23T10:44:25+08:00","size":2816,"digest":"7ff112568709bf97f9898fe87249b7a8f200ff1f48d537d85af87215f1870423","integrity":"sha256-f/ESVocJv5f5iY/ockm3qPIA/x9I1TfYWvhyFfGHBCM="},"application-761d0bb354d6008e853fd0b68663f5306c5035dcc0f500d6871025bcaefe0b13.js":{"logical_path":"application.js","mtime":"2019-08-29T10:56:46+08:00","size":1459545,"digest":"761d0bb354d6008e853fd0b68663f5306c5035dcc0f500d6871025bcaefe0b13","integrity":"sha256-dh0Ls1TWAI6FP9C2hmP1MGxQNdzA9QDWhxAlvK7+CxM="},"application-7e4c4f5e746a2d6a6fef715d6fc71005b3d8ab897e7b8fb7cb06419357bd60fe.css":{"logical_path":"application.css","mtime":"2019-08-29T10:56:46+08:00","size":1146039,"digest":"7e4c4f5e746a2d6a6fef715d6fc71005b3d8ab897e7b8fb7cb06419357bd60fe","integrity":"sha256-fkxPXnRqLWpv73Fdb8cQBbPYq4l+e4+3ywZBk1e9YP4="},"admin-692c392528c56090d88fec92e6ff3b6a3442c6a691d9467c3b51e82625417c53.js":{"logical_path":"admin.js","mtime":"2019-08-29T13:45:30+08:00","size":1324968,"digest":"692c392528c56090d88fec92e6ff3b6a3442c6a691d9467c3b51e82625417c53","integrity":"sha256-aSw5JSjFYJDYj+yS5v87ajRCxqaR2UZ8O1HoJiVBfFM="},"admin-94f6ba0b0c1720d61b4dbf60d7c939f8023f170e36099597cc002f546f90a051.css":{"logical_path":"admin.css","mtime":"2019-08-29T13:45:30+08:00","size":640433,"digest":"94f6ba0b0c1720d61b4dbf60d7c939f8023f170e36099597cc002f546f90a051","integrity":"sha256-lPa6CwwXINYbTb9g18k5+AI/Fw42CZWXzAAvVG+QoFE="},"application-8ba6bce5955b760cd5bb9229d2440d3ef53fcbc4b071d9d0e9206176a0337957.js":{"logical_path":"application.js","mtime":"2019-08-29T13:45:30+08:00","size":1459510,"digest":"8ba6bce5955b760cd5bb9229d2440d3ef53fcbc4b071d9d0e9206176a0337957","integrity":"sha256-i6a85ZVbdgzVu5Ip0kQNPvU/y8SwcdnQ6SBhdqAzeVc="},"application-d85c0ab2b3ec2cef4cbc8c4efce6d5bfa77c8568a0cbfd4ac74e0cb206b6f3eb.css":{"logical_path":"application.css","mtime":"2019-08-29T13:45:30+08:00","size":1146321,"digest":"d85c0ab2b3ec2cef4cbc8c4efce6d5bfa77c8568a0cbfd4ac74e0cb206b6f3eb","integrity":"sha256-2FwKsrPsLO9MvIxO/ObVv6d8hWigy/1Kx04Msga28+s="}},"assets":{"admin.js":"admin-692c392528c56090d88fec92e6ff3b6a3442c6a691d9467c3b51e82625417c53.js","admin.css":"admin-94f6ba0b0c1720d61b4dbf60d7c939f8023f170e36099597cc002f546f90a051.css","font-awesome/fontawesome-webfont.eot":"font-awesome/fontawesome-webfont-7bfcab6db99d5cfbf1705ca0536ddc78585432cc5fa41bbd7ad0f009033b2979.eot","font-awesome/fontawesome-webfont.woff2":"font-awesome/fontawesome-webfont-2adefcbc041e7d18fcf2d417879dc5a09997aa64d675b7a3c4b6ce33da13f3fe.woff2","font-awesome/fontawesome-webfont.woff":"font-awesome/fontawesome-webfont-ba0c59deb5450f5cb41b3f93609ee2d0d995415877ddfa223e8a8a7533474f07.woff","font-awesome/fontawesome-webfont.ttf":"font-awesome/fontawesome-webfont-aa58f33f239a0fb02f5c7a6c45c043d7a9ac9a093335806694ecd6d4edc0d6a8.ttf","font-awesome/fontawesome-webfont.svg":"font-awesome/fontawesome-webfont-ad6157926c1622ba4e1d03d478f1541368524bfc46f51e42fe0d945f7ef323e4.svg","logo.png":"logo-7ff112568709bf97f9898fe87249b7a8f200ff1f48d537d85af87215f1870423.png","application.js":"application-8ba6bce5955b760cd5bb9229d2440d3ef53fcbc4b071d9d0e9206176a0337957.js","application.css":"application-d85c0ab2b3ec2cef4cbc8c4efce6d5bfa77c8568a0cbfd4ac74e0cb206b6f3eb.css"}} \ No newline at end of file diff --git a/public/assets/admin-9bc01d92961108adb06739ae43d52928cbf41d383bf27a4ae2125ad232f2f16d.js b/public/assets/admin-692c392528c56090d88fec92e6ff3b6a3442c6a691d9467c3b51e82625417c53.js similarity index 99% rename from public/assets/admin-9bc01d92961108adb06739ae43d52928cbf41d383bf27a4ae2125ad232f2f16d.js rename to public/assets/admin-692c392528c56090d88fec92e6ff3b6a3442c6a691d9467c3b51e82625417c53.js index 6cf15aa3a..54423bac3 100644 --- a/public/assets/admin-9bc01d92961108adb06739ae43d52928cbf41d383bf27a4ae2125ad232f2f16d.js +++ b/public/assets/admin-692c392528c56090d88fec92e6ff3b6a3442c6a691d9467c3b51e82625417c53.js @@ -38362,46 +38362,37 @@ $(document).on('turbolinks:load', function() { ; $(document).on('turbolinks:load', function() { if ($('body.admins-shixun-settings-index-page').length > 0) { + $(".shixun-settings-select").on("change", function () { + var s_value = $(this).val(); + var s_name = $(this).attr("name"); + var json = {}; + json[s_name] = s_value; + $.ajax({ + url: "/admins/shixun_settings", + type: "GET", + dataType:'script', + data: json + }) + }); + $(".shixun-setting-form").on("change",function () { + var s_id = $(this).attr("data-id"); + var s_value = $(this).val(); + var s_name = $(this).attr("name"); + var json = {}; + var s_index = $(this).parent("td").siblings(".shixun-line-no").text(); + json[s_name] = s_value; + json["page_no"] = s_index; + $.ajax({ + url: "/admins/shixun_settings/" + s_id, + type: "PUT", + dataType:'script', + data: json + }) + }) } }); -function update_change(target) { - var s_id = $(target).attr("data-id"); - var s_value = $(target).val(); - var s_name = $(target).attr("name"); - var json = {}; - var s_index = $(target).parent("td").siblings(".shixun-line-no").text(); - json[s_name] = s_value; - json["page_no"] = s_index; - $.ajax({ - url: "/admins/shixun_settings/" + s_id, - type: "PUT", - dataType:'script', - data: json, - success: function (data) { - - } - }) -} - - -function select_change(target) { - var s_value = $(target).val(); - var s_name = $(target).attr("name"); - var json = {}; - json[s_name] = s_value; - $.ajax({ - url: "/admins/shixun_settings/", - type: "GET", - dataType:'script', - data: json, - success: function (data) { - - } - }) -} -; $(document).on('turbolinks:load', function() { $('select#tag-choosed').select2({ placeholder: "请选择分类", diff --git a/public/assets/admin-9bc01d92961108adb06739ae43d52928cbf41d383bf27a4ae2125ad232f2f16d.js.gz b/public/assets/admin-692c392528c56090d88fec92e6ff3b6a3442c6a691d9467c3b51e82625417c53.js.gz similarity index 97% rename from public/assets/admin-9bc01d92961108adb06739ae43d52928cbf41d383bf27a4ae2125ad232f2f16d.js.gz rename to public/assets/admin-692c392528c56090d88fec92e6ff3b6a3442c6a691d9467c3b51e82625417c53.js.gz index 0302686cf..03c214092 100644 Binary files a/public/assets/admin-9bc01d92961108adb06739ae43d52928cbf41d383bf27a4ae2125ad232f2f16d.js.gz and b/public/assets/admin-692c392528c56090d88fec92e6ff3b6a3442c6a691d9467c3b51e82625417c53.js.gz differ diff --git a/public/assets/admin-96af063037e0babf25b1579d1c9d1e1901961d10a58ef3d41feb9e68feff348b.css b/public/assets/admin-94f6ba0b0c1720d61b4dbf60d7c939f8023f170e36099597cc002f546f90a051.css similarity index 99% rename from public/assets/admin-96af063037e0babf25b1579d1c9d1e1901961d10a58ef3d41feb9e68feff348b.css rename to public/assets/admin-94f6ba0b0c1720d61b4dbf60d7c939f8023f170e36099597cc002f546f90a051.css index 0acd5f130..ea95aa0e2 100644 --- a/public/assets/admin-96af063037e0babf25b1579d1c9d1e1901961d10a58ef3d41feb9e68feff348b.css +++ b/public/assets/admin-94f6ba0b0c1720d61b4dbf60d7c939f8023f170e36099597cc002f546f90a051.css @@ -18726,6 +18726,13 @@ input[type="checkbox"] { border: 1px solid #eee !important; } +/* line 10, app/assets/stylesheets/admins/shixun_settings.scss */ +.setting-chosen { + font-weight: 400; + font-size: 10px; + color: #333; +} + /* line 1, app/assets/stylesheets/admins/sidebar.scss */ #sidebar { min-width: 200px; diff --git a/public/assets/admin-96af063037e0babf25b1579d1c9d1e1901961d10a58ef3d41feb9e68feff348b.css.gz b/public/assets/admin-94f6ba0b0c1720d61b4dbf60d7c939f8023f170e36099597cc002f546f90a051.css.gz similarity index 97% rename from public/assets/admin-96af063037e0babf25b1579d1c9d1e1901961d10a58ef3d41feb9e68feff348b.css.gz rename to public/assets/admin-94f6ba0b0c1720d61b4dbf60d7c939f8023f170e36099597cc002f546f90a051.css.gz index b48eb3027..64b11d882 100644 Binary files a/public/assets/admin-96af063037e0babf25b1579d1c9d1e1901961d10a58ef3d41feb9e68feff348b.css.gz and b/public/assets/admin-94f6ba0b0c1720d61b4dbf60d7c939f8023f170e36099597cc002f546f90a051.css.gz differ diff --git a/public/assets/application-761d0bb354d6008e853fd0b68663f5306c5035dcc0f500d6871025bcaefe0b13.js b/public/assets/application-8ba6bce5955b760cd5bb9229d2440d3ef53fcbc4b071d9d0e9206176a0337957.js similarity index 99% rename from public/assets/application-761d0bb354d6008e853fd0b68663f5306c5035dcc0f500d6871025bcaefe0b13.js rename to public/assets/application-8ba6bce5955b760cd5bb9229d2440d3ef53fcbc4b071d9d0e9206176a0337957.js index 31929c033..62b797984 100644 --- a/public/assets/application-761d0bb354d6008e853fd0b68663f5306c5035dcc0f500d6871025bcaefe0b13.js +++ b/public/assets/application-8ba6bce5955b760cd5bb9229d2440d3ef53fcbc4b071d9d0e9206176a0337957.js @@ -38362,46 +38362,37 @@ $(document).on('turbolinks:load', function() { ; $(document).on('turbolinks:load', function() { if ($('body.admins-shixun-settings-index-page').length > 0) { + $(".shixun-settings-select").on("change", function () { + var s_value = $(this).val(); + var s_name = $(this).attr("name"); + var json = {}; + json[s_name] = s_value; + $.ajax({ + url: "/admins/shixun_settings", + type: "GET", + dataType:'script', + data: json + }) + }); + $(".shixun-setting-form").on("change",function () { + var s_id = $(this).attr("data-id"); + var s_value = $(this).val(); + var s_name = $(this).attr("name"); + var json = {}; + var s_index = $(this).parent("td").siblings(".shixun-line-no").text(); + json[s_name] = s_value; + json["page_no"] = s_index; + $.ajax({ + url: "/admins/shixun_settings/" + s_id, + type: "PUT", + dataType:'script', + data: json + }) + }) } }); -function update_change(target) { - var s_id = $(target).attr("data-id"); - var s_value = $(target).val(); - var s_name = $(target).attr("name"); - var json = {}; - var s_index = $(target).parent("td").siblings(".shixun-line-no").text(); - json[s_name] = s_value; - json["page_no"] = s_index; - $.ajax({ - url: "/admins/shixun_settings/" + s_id, - type: "PUT", - dataType:'script', - data: json, - success: function (data) { - - } - }) -} - - -function select_change(target) { - var s_value = $(target).val(); - var s_name = $(target).attr("name"); - var json = {}; - json[s_name] = s_value; - $.ajax({ - url: "/admins/shixun_settings/", - type: "GET", - dataType:'script', - data: json, - success: function (data) { - - } - }) -} -; $(document).on('turbolinks:load', function() { $('select#tag-choosed').select2({ placeholder: "请选择分类", diff --git a/public/assets/application-761d0bb354d6008e853fd0b68663f5306c5035dcc0f500d6871025bcaefe0b13.js.gz b/public/assets/application-8ba6bce5955b760cd5bb9229d2440d3ef53fcbc4b071d9d0e9206176a0337957.js.gz similarity index 81% rename from public/assets/application-761d0bb354d6008e853fd0b68663f5306c5035dcc0f500d6871025bcaefe0b13.js.gz rename to public/assets/application-8ba6bce5955b760cd5bb9229d2440d3ef53fcbc4b071d9d0e9206176a0337957.js.gz index 29e2dd916..36faaa5a0 100644 Binary files a/public/assets/application-761d0bb354d6008e853fd0b68663f5306c5035dcc0f500d6871025bcaefe0b13.js.gz and b/public/assets/application-8ba6bce5955b760cd5bb9229d2440d3ef53fcbc4b071d9d0e9206176a0337957.js.gz differ diff --git a/public/assets/application-7e4c4f5e746a2d6a6fef715d6fc71005b3d8ab897e7b8fb7cb06419357bd60fe.css b/public/assets/application-d85c0ab2b3ec2cef4cbc8c4efce6d5bfa77c8568a0cbfd4ac74e0cb206b6f3eb.css similarity index 99% rename from public/assets/application-7e4c4f5e746a2d6a6fef715d6fc71005b3d8ab897e7b8fb7cb06419357bd60fe.css rename to public/assets/application-d85c0ab2b3ec2cef4cbc8c4efce6d5bfa77c8568a0cbfd4ac74e0cb206b6f3eb.css index 2b89b1fad..b819aa43c 100644 --- a/public/assets/application-7e4c4f5e746a2d6a6fef715d6fc71005b3d8ab897e7b8fb7cb06419357bd60fe.css +++ b/public/assets/application-d85c0ab2b3ec2cef4cbc8c4efce6d5bfa77c8568a0cbfd4ac74e0cb206b6f3eb.css @@ -18726,6 +18726,13 @@ input[type="checkbox"] { border: 1px solid #eee !important; } +/* line 10, app/assets/stylesheets/admins/shixun_settings.scss */ +.setting-chosen { + font-weight: 400; + font-size: 10px; + color: #333; +} + /* line 1, app/assets/stylesheets/admins/sidebar.scss */ #sidebar { min-width: 200px; @@ -19421,6 +19428,13 @@ input[type="checkbox"] { .select2 .select2-selection__choice { border: 1px solid #eee !important; } + +/* line 10, app/assets/stylesheets/admins/shixun_settings.scss */ +.setting-chosen { + font-weight: 400; + font-size: 10px; + color: #333; +} /* line 1, app/assets/stylesheets/admins/sidebar.scss */ #sidebar { min-width: 200px; diff --git a/public/assets/application-7e4c4f5e746a2d6a6fef715d6fc71005b3d8ab897e7b8fb7cb06419357bd60fe.css.gz b/public/assets/application-d85c0ab2b3ec2cef4cbc8c4efce6d5bfa77c8568a0cbfd4ac74e0cb206b6f3eb.css.gz similarity index 60% rename from public/assets/application-7e4c4f5e746a2d6a6fef715d6fc71005b3d8ab897e7b8fb7cb06419357bd60fe.css.gz rename to public/assets/application-d85c0ab2b3ec2cef4cbc8c4efce6d5bfa77c8568a0cbfd4ac74e0cb206b6f3eb.css.gz index 6b2204c06..c44bb3a3b 100644 Binary files a/public/assets/application-7e4c4f5e746a2d6a6fef715d6fc71005b3d8ab897e7b8fb7cb06419357bd60fe.css.gz and b/public/assets/application-d85c0ab2b3ec2cef4cbc8c4efce6d5bfa77c8568a0cbfd4ac74e0cb206b6f3eb.css.gz differ diff --git a/public/editormd/lib/marked.min.backup.js b/public/editormd/lib/marked.min.backup.js new file mode 100644 index 000000000..28e20ebec --- /dev/null +++ b/public/editormd/lib/marked.min.backup.js @@ -0,0 +1,18 @@ +/** + 备注,这个改动没启用,只是做个记录: + br不转成br + 加了个 if (cap[0] != '
' && cap[0] != '
') { out+=this.options.sanitize?escape(cap[0]):cap[0]; } + */ +/** + * marked - a markdown parser + * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed) + * https://github.com/markedjs/marked + 2019 08 29 + + case"html":return this.renderer.html((this.token.text)); + --> + case"html":return this.renderer.paragraph(this.inline.output(this.token.text)); + + add: && !(e instanceof String) + */ +!function(e){"use strict";var x={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}|~{3,})([^`~\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:g,table:g,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};function a(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||k.defaults,this.rules=x.normal,this.options.pedantic?this.rules=x.pedantic:this.options.gfm&&(this.rules=x.gfm)}x._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,x._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,x.def=i(x.def).replace("label",x._label).replace("title",x._title).getRegex(),x.bullet=/(?:[*+-]|\d{1,9}\.)/,x.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,x.item=i(x.item,"gm").replace(/bull/g,x.bullet).getRegex(),x.list=i(x.list).replace(/bull/g,x.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+x.def.source+")").getRegex(),x._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",x._comment=//,x.html=i(x.html,"i").replace("comment",x._comment).replace("tag",x._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),x.paragraph=i(x._paragraph).replace("hr",x.hr).replace("heading"," {0,3}#{1,6} +").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}|~{3,})[^`\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",x._tag).getRegex(),x.blockquote=i(x.blockquote).replace("paragraph",x.paragraph).getRegex(),x.normal=f({},x),x.gfm=f({},x.normal,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),x.pedantic=f({},x.normal,{html:i("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",x._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:g,paragraph:i(x.normal._paragraph).replace("hr",x.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",x.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()}),a.rules=x,a.lex=function(e,t){return new a(t).lex(e)},a.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},a.prototype.token=function(e,t){var n,r,s,i,l,o,a,h,p,u,c,g,f,d,m,k;for(e=e.replace(/^ +$/gm,"");e;)if((s=this.rules.newline.exec(e))&&(e=e.substring(s[0].length),1 ?/gm,""),this.token(s,t),this.tokens.push({type:"blockquote_end"});else if(s=this.rules.list.exec(e)){for(e=e.substring(s[0].length),a={type:"list_start",ordered:d=1<(i=s[2]).length,start:d?+i:"",loose:!1},this.tokens.push(a),n=!(h=[]),f=(s=s[0].match(this.rules.item)).length,c=0;c?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:g,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:g,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[^_{|}~",n.em=i(n.em).replace(/punctuation/g,n._punctuation).getRegex(),n._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,n._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,n._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,n.autolink=i(n.autolink).replace("scheme",n._scheme).replace("email",n._email).getRegex(),n._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,n.tag=i(n.tag).replace("comment",x._comment).replace("attribute",n._attribute).getRegex(),n._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,n._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,n._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,n.link=i(n.link).replace("label",n._label).replace("href",n._href).replace("title",n._title).getRegex(),n.reflink=i(n.reflink).replace("label",n._label).getRegex(),n.normal=f({},n),n.pedantic=f({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:i(/^!?\[(label)\]\((.*?)\)/).replace("label",n._label).getRegex(),reflink:i(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",n._label).getRegex()}),n.gfm=f({},n.normal,{escape:i(n.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\/i.test(i[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(this.inRawBlock=!1),e=e.substring(i[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):_(i[0]):i[0];else if(i=this.rules.link.exec(e)){var a=d(i[2],"()");if(-1$/,"$1"),o+=this.outputLink(i,{href:p.escapes(r),title:p.escapes(s)}),this.inLink=!1}else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){o+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),o+=this.renderer.strong(this.output(i[4]||i[3]||i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),o+=this.renderer.em(this.output(i[6]||i[5]||i[4]||i[3]||i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),o+=this.renderer.codespan(_(i[2].trim(),!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),o+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),o+=this.renderer.del(this.output(i[1]));else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),r="@"===i[2]?"mailto:"+(n=_(this.mangle(i[1]))):n=_(i[1]),o+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.text.exec(e))e=e.substring(i[0].length),this.inRawBlock?o+=this.renderer.text(this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):_(i[0]):i[0]):o+=this.renderer.text(_(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===i[2])r="mailto:"+(n=_(i[0]));else{for(;l=i[0],i[0]=this.rules._backpedal.exec(i[0])[0],l!==i[0];);n=_(i[0]),r="www."===i[1]?"http://"+n:n}e=e.substring(i[0].length),o+=this.renderer.link(r,null,n)}return o},p.escapes=function(e){return e?e.replace(p.rules._escapes,"$1"):e},p.prototype.outputLink=function(e,t){var n=t.href,r=t.title?_(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,_(e[1]))},p.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},p.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,s=0;s'+(n?e:_(e,!0))+"\n":"
"+(n?e:_(e,!0))+"
"},r.prototype.blockquote=function(e){return"
\n"+e+"
\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},r.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},r.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},r.prototype.checkbox=function(e){return" "},r.prototype.paragraph=function(e){return"

    "+e+"

    \n"},r.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},r.prototype.tablerow=function(e){return"\n"+e+"\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,n){if(null===(e=l(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"},r.prototype.image=function(e,t,n){if(null===(e=l(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},r.prototype.text=function(e){return e},s.prototype.strong=s.prototype.em=s.prototype.codespan=s.prototype.del=s.prototype.text=function(e){return e},s.prototype.link=s.prototype.image=function(e,t,n){return""+n},s.prototype.br=function(){return""},h.parse=function(e,t){return new h(t).parse(e)},h.prototype.parse=function(e){this.inline=new p(e.links,this.options),this.inlineText=new p(e.links,f({},this.options,{renderer:new s})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},h.prototype.next=function(){return this.token=this.tokens.pop(),this.token},h.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},h.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},h.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,c(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,s="",i="";for(n="",e=0;e?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t))for(var n=t;this.seen[n]++,t=n+"-"+this.seen[n],this.seen.hasOwnProperty(t););return this.seen[t]=0,t},_.escapeTest=/[&<>"']/,_.escapeReplace=/[&<>"']/g,_.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},_.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,_.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var o={},u=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function g(){}function f(e){for(var t,n,r=1;rt)n.splice(t);else for(;n.lengthAn error occurred:

    "+_(e.message+"",!0)+"
    ";throw e}}g.exec=g,k.options=k.setOptions=function(e){return f(k.defaults,e),k},k.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new r,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}},k.defaults=k.getDefaults(),k.Parser=h,k.parser=h.parse,k.Renderer=r,k.TextRenderer=s,k.Lexer=a,k.lexer=a.lex,k.InlineLexer=p,k.inlineLexer=p.output,k.Slugger=t,k.parse=k,"undefined"!=typeof module&&"object"==typeof exports?module.exports=k:"function"==typeof define&&define.amd?define(function(){return k}):e.marked=k}(this||("undefined"!=typeof window?window:global)); \ No newline at end of file diff --git a/public/editormd/lib/marked.min.js b/public/editormd/lib/marked.min.js index 1ba27d2f4..519296797 100644 --- a/public/editormd/lib/marked.min.js +++ b/public/editormd/lib/marked.min.js @@ -1,18 +1,13 @@ -/** +/** + * marked v0.3.3 - a markdown parser + * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) + * https://github.com/chjj/marked + 备注,这个改动没启用,只是做个记录: br不转成br 加了个 if (cap[0] != '
    ' && cap[0] != '
    ') { out+=this.options.sanitize?escape(cap[0]):cap[0]; } */ -/** - * marked - a markdown parser - * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed) - * https://github.com/markedjs/marked - 2019 08 29 - - case"html":return this.renderer.html((this.token.text)); - --> - case"html":return this.renderer.paragraph(this.inline.output(this.token.text)); - - add: && !(e instanceof String) - */ -!function(e){"use strict";var x={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}|~{3,})([^`~\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:g,table:g,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};function a(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||k.defaults,this.rules=x.normal,this.options.pedantic?this.rules=x.pedantic:this.options.gfm&&(this.rules=x.gfm)}x._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,x._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,x.def=i(x.def).replace("label",x._label).replace("title",x._title).getRegex(),x.bullet=/(?:[*+-]|\d{1,9}\.)/,x.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,x.item=i(x.item,"gm").replace(/bull/g,x.bullet).getRegex(),x.list=i(x.list).replace(/bull/g,x.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+x.def.source+")").getRegex(),x._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",x._comment=//,x.html=i(x.html,"i").replace("comment",x._comment).replace("tag",x._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),x.paragraph=i(x._paragraph).replace("hr",x.hr).replace("heading"," {0,3}#{1,6} +").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}|~{3,})[^`\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",x._tag).getRegex(),x.blockquote=i(x.blockquote).replace("paragraph",x.paragraph).getRegex(),x.normal=f({},x),x.gfm=f({},x.normal,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),x.pedantic=f({},x.normal,{html:i("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",x._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:g,paragraph:i(x.normal._paragraph).replace("hr",x.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",x.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()}),a.rules=x,a.lex=function(e,t){return new a(t).lex(e)},a.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},a.prototype.token=function(e,t){var n,r,s,i,l,o,a,h,p,u,c,g,f,d,m,k;for(e=e.replace(/^ +$/gm,"");e;)if((s=this.rules.newline.exec(e))&&(e=e.substring(s[0].length),1 ?/gm,""),this.token(s,t),this.tokens.push({type:"blockquote_end"});else if(s=this.rules.list.exec(e)){for(e=e.substring(s[0].length),a={type:"list_start",ordered:d=1<(i=s[2]).length,start:d?+i:"",loose:!1},this.tokens.push(a),n=!(h=[]),f=(s=s[0].match(this.rules.item)).length,c=0;c?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:g,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:g,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[^_{|}~",n.em=i(n.em).replace(/punctuation/g,n._punctuation).getRegex(),n._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,n._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,n._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,n.autolink=i(n.autolink).replace("scheme",n._scheme).replace("email",n._email).getRegex(),n._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,n.tag=i(n.tag).replace("comment",x._comment).replace("attribute",n._attribute).getRegex(),n._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,n._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,n._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,n.link=i(n.link).replace("label",n._label).replace("href",n._href).replace("title",n._title).getRegex(),n.reflink=i(n.reflink).replace("label",n._label).getRegex(),n.normal=f({},n),n.pedantic=f({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:i(/^!?\[(label)\]\((.*?)\)/).replace("label",n._label).getRegex(),reflink:i(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",n._label).getRegex()}),n.gfm=f({},n.normal,{escape:i(n.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\/i.test(i[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(this.inRawBlock=!1),e=e.substring(i[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):_(i[0]):i[0];else if(i=this.rules.link.exec(e)){var a=d(i[2],"()");if(-1$/,"$1"),o+=this.outputLink(i,{href:p.escapes(r),title:p.escapes(s)}),this.inLink=!1}else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){o+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),o+=this.renderer.strong(this.output(i[4]||i[3]||i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),o+=this.renderer.em(this.output(i[6]||i[5]||i[4]||i[3]||i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),o+=this.renderer.codespan(_(i[2].trim(),!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),o+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),o+=this.renderer.del(this.output(i[1]));else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),r="@"===i[2]?"mailto:"+(n=_(this.mangle(i[1]))):n=_(i[1]),o+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.text.exec(e))e=e.substring(i[0].length),this.inRawBlock?o+=this.renderer.text(this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):_(i[0]):i[0]):o+=this.renderer.text(_(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===i[2])r="mailto:"+(n=_(i[0]));else{for(;l=i[0],i[0]=this.rules._backpedal.exec(i[0])[0],l!==i[0];);n=_(i[0]),r="www."===i[1]?"http://"+n:n}e=e.substring(i[0].length),o+=this.renderer.link(r,null,n)}return o},p.escapes=function(e){return e?e.replace(p.rules._escapes,"$1"):e},p.prototype.outputLink=function(e,t){var n=t.href,r=t.title?_(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,_(e[1]))},p.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},p.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,s=0;s'+(n?e:_(e,!0))+"\n":"
    "+(n?e:_(e,!0))+"
    "},r.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},r.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},r.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},r.prototype.checkbox=function(e){return" "},r.prototype.paragraph=function(e){return"

    "+e+"

    \n"},r.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},r.prototype.tablerow=function(e){return"\n"+e+"\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,n){if(null===(e=l(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
    "},r.prototype.image=function(e,t,n){if(null===(e=l(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},r.prototype.text=function(e){return e},s.prototype.strong=s.prototype.em=s.prototype.codespan=s.prototype.del=s.prototype.text=function(e){return e},s.prototype.link=s.prototype.image=function(e,t,n){return""+n},s.prototype.br=function(){return""},h.parse=function(e,t){return new h(t).parse(e)},h.prototype.parse=function(e){this.inline=new p(e.links,this.options),this.inlineText=new p(e.links,f({},this.options,{renderer:new s})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},h.prototype.next=function(){return this.token=this.tokens.pop(),this.token},h.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},h.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},h.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,c(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,s="",i="";for(n="",e=0;e?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t))for(var n=t;this.seen[n]++,t=n+"-"+this.seen[n],this.seen.hasOwnProperty(t););return this.seen[t]=0,t},_.escapeTest=/[&<>"']/,_.escapeReplace=/[&<>"']/g,_.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},_.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,_.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var o={},u=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function g(){}function f(e){for(var t,n,r=1;rt)n.splice(t);else for(;n.lengthAn error occurred:

    "+_(e.message+"",!0)+"
    ";throw e}}g.exec=g,k.options=k.setOptions=function(e){return f(k.defaults,e),k},k.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new r,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}},k.defaults=k.getDefaults(),k.Parser=h,k.parser=h.parse,k.Renderer=r,k.TextRenderer=s,k.Lexer=a,k.lexer=a.lex,k.InlineLexer=p,k.inlineLexer=p.output,k.Slugger=t,k.parse=k,"undefined"!=typeof module&&"object"==typeof exports?module.exports=k:"function"==typeof define&&define.amd?define(function(){return k}):e.marked=k}(this||("undefined"!=typeof window?window:global)); \ No newline at end of file +(function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose){loose=next}}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq); +this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:cap[1]==="pre"||cap[1]==="script"||cap[1]==="style",text:cap[0]});continue}if((!bq&&top)&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else{if(this.options.pedantic){this.rules=inline.pedantic}}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^
    /i.test(cap[0])){this.inLink=false}}src=src.substring(cap[0].length);out+=this.options.sanitize?escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue +}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=escape(this.smartypants(cap[0]));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants){return text}return text.replace(/--/g,"\u2014").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201c").replace(/"/g,"\u201d").replace(/\.{3}/g,"\u2026")};InlineLexer.prototype.mangle=function(text){var out="",l=text.length,i=0,ch;for(;i0.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"
    "+(escaped?code:escape(code,true))+"\n
    "}return'
    '+(escaped?code:escape(code,true))+"\n
    \n"};Renderer.prototype.blockquote=function(quote){return"
    \n"+quote+"
    \n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"'+text+"\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+"\n"};Renderer.prototype.listitem=function(text){return"
  • "+text+"
  • \n"};Renderer.prototype.paragraph=function(text){return"

    "+text+"

    \n"};Renderer.prototype.table=function(header,body){return"\n"+"\n"+header+"\n"+"\n"+body+"\n"+"
    \n"};Renderer.prototype.tablerow=function(content){return"\n"+content+"\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+"\n"};Renderer.prototype.strong=function(text){return""+text+""};Renderer.prototype.em=function(text){return""+text+""};Renderer.prototype.codespan=function(text){return""+text+""};Renderer.prototype.br=function(){return this.options.xhtml?"
    ":"
    "};Renderer.prototype.del=function(text){return""+text+""};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var out='
    ";return out};Renderer.prototype.image=function(href,title,text){var out=''+text+'":">";return out};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon"){return":"}if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name){return new RegExp(regex,opt)}val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;iAn error occured:

    "+escape(e.message+"",true)+"
    "}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else{if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}}).call(function(){return this||(typeof window!=="undefined"?window:global)}()); \ No newline at end of file diff --git a/public/react/src/App.css b/public/react/src/App.css index 2b3d8d08c..42e40f8c8 100644 --- a/public/react/src/App.css +++ b/public/react/src/App.css @@ -55,6 +55,9 @@ html, body { .markdown-body p { white-space: pre-wrap; } +.markdown-body > p { + line-height: 25px; +} /* https://www.educoder.net/courses/2346/group_homeworks/34405/question */ .renderAsHtml.markdown-body p { white-space: inherit; diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index 57f567c9e..4f37ac816 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -1566,7 +1566,7 @@ samp { padding-left: 5px; } .padding10200{ - padding: 10px 20px 0px; + padding: 10px 20px; } .padding1020{ padding: 10px 20px 10px; diff --git a/public/react/src/modules/courses/exercise/question/fillEmpty.js b/public/react/src/modules/courses/exercise/question/fillEmpty.js index 24ff7b641..737fef682 100644 --- a/public/react/src/modules/courses/exercise/question/fillEmpty.js +++ b/public/react/src/modules/courses/exercise/question/fillEmpty.js @@ -129,7 +129,7 @@ class fillEmpty extends Component{ } { // 答案公开,且试卷已经截止 - isAdmin && + questionType.standard_answer &&

    参考答案:

    { questionType.standard_answer && questionType.standard_answer.map((item,k)=>{ diff --git a/public/react/src/modules/courses/exercise/question/simpleAnswer.js b/public/react/src/modules/courses/exercise/question/simpleAnswer.js index 527044968..1dfcbdb2a 100644 --- a/public/react/src/modules/courses/exercise/question/simpleAnswer.js +++ b/public/react/src/modules/courses/exercise/question/simpleAnswer.js @@ -85,9 +85,9 @@ class simpleAnswer extends Component{
    } { - isStudent && exercise.answer_open==true && exercise.exercise_status == 3 ? + isStudent && questionType.standard_answer ?
    -

    参考答案:

    +

    参考答案:

    {/*
  • */} { - console.log('successCallback') - }, - failCallback: (responseHtml, url) => { - console.log('failCallback') - } - }) + window.open("/api"+url, '_blank'); + // downloadFile({ + // url: url, + // successCallback: (url) => { + // console.log('successCallback') + // }, + // failCallback: (responseHtml, url) => { + // console.log('failCallback') + // } + // }) } }).catch((error) => { console.log(error) @@ -606,13 +606,13 @@ class studentsList extends Component{
  • 导出 diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index 7ff0a9e4c..c3096adeb 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -606,7 +606,7 @@ class CoursesNew extends Component { `} -
    +
    @@ -647,7 +633,7 @@ class CoursesNew extends Component { })( @@ -884,7 +870,7 @@ class CoursesNew extends Component { {optionschool} diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js index c9642f458..8ef193947 100644 --- a/public/react/src/modules/courses/new/Goldsubject.js +++ b/public/react/src/modules/courses/new/Goldsubject.js @@ -794,18 +794,7 @@ class Goldsubject extends Component { width: 65px !important; background-color: #fafafa!important; } - - .yslzxueshis .ant-select-dropdown{ - width: 655px !important; - height:160px !important; - } - .yslzxueshis .ant-select-dropdown-menu{ - width: 655px !important; - } - .ant-select-dropdown{ - width: 655px !important; - height:160px !important; - } + ` }