diff --git a/web/template/syzoj/problem.php b/web/template/syzoj/problem.php index cf8b55a..e430e15 100644 --- a/web/template/syzoj/problem.php +++ b/web/template/syzoj/problem.php @@ -123,8 +123,10 @@ if ($pr_flag) { { $s = $str; $s = bbcode_to_html($s); - if (strpos($s, "class='md") === false && - strpos($s, "class=\"md") === false) // 没找到,那就加上 + if ( + strpos($s, "class='md") === false && + strpos($s, "class=\"md") === false + ) // 没找到,那就加上 $s = "" . $s . ""; return $s; } @@ -477,6 +479,11 @@ if ($pr_flag) { $(this).html(marked.parse($(this).html())); const md = window.markdownit(); + md.set({ + html: true, + linkify: true, + typographer: true, + }) $(this).html(md.render($(this).html())); });