From cdfb67fb3f9148a354b927dada5b98bcdfe6c57b Mon Sep 17 00:00:00 2001 From: klarkxy <278370456@qq.com> Date: Sat, 10 May 2025 16:29:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=9B=9E=E5=8E=9F=E6=9D=A5=E7=9A=84?= =?UTF-8?q?=E8=AF=95=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/include/db_info.inc.php | 2 +- web/template/syzoj/problem.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/include/db_info.inc.php b/web/include/db_info.inc.php index f24c5fd..01954b8 100644 --- a/web/include/db_info.inc.php +++ b/web/include/db_info.inc.php @@ -85,7 +85,7 @@ static $OJ_RANK_HIDDEN="'admin','super','szx','sen'"; // 管理员不显示在 static $OJ_FRIENDLY_LEVEL=0; //系统友好级别,暂定0-9级,级别越高越傻瓜,系统易用度高的同时将降低安全性,仅供非专业用途,造成泄题、抄袭概不负责。 static $OJ_FREE_PRACTICE=true; //自由练习,不受比赛作业用题限制 static $OJ_SUBMIT_COOLDOWN_TIME=1; //提交冷却时间,连续两次提交的最小间隔,单位秒。 -static $OJ_MARKDOWN='marked.js'; // 开启MARKDOWN,开启后在后台编辑题目时默认为源码模式,用[md] # Markdown [/md] 格式插入markdown代码, 如果需要用到[]也可以用
。 +static $OJ_MARKDOWN='markdown-it'; // 开启MARKDOWN,开启后在后台编辑题目时默认为源码模式,用[md] # Markdown [/md] 格式插入markdown代码, 如果需要用到[]也可以用
。 static $OJ_INDEX_NEWS_TITLE='HelloWorld!'; // 在syzoj的首页显示哪一篇标题的文章(可以有多个相同标题) static $OJ_DIV_FILTER=true; // 过滤题面中的div,修复显示异常,特别是来自其他OJ系统的题面。 static $OJ_LIMIT_TO_1_IP=true; // 限制用户同一时刻只能在一个IP地址登录 diff --git a/web/template/syzoj/problem.php b/web/template/syzoj/problem.php index 6d1a1ae..ab23eca 100644 --- a/web/template/syzoj/problem.php +++ b/web/template/syzoj/problem.php @@ -513,7 +513,7 @@ if ($pr_flag) { $(".md").each(function () { - markdown_content = marked.parse($(this).html())); + let markdown_content = marked.parse($(this).html()); const md = window.markdownit(); md.set({ @@ -521,7 +521,7 @@ if ($pr_flag) { linkify: true, typographer: true, }) - markdown_content = md.render($(this).html()); + let markdown_content = md.render($(this).html()); $(this).html(markdown_content) });