diff --git a/web/template/syzoj/problem.php b/web/template/syzoj/problem.php index 87fc37e..c80ade3 100644 --- a/web/template/syzoj/problem.php +++ b/web/template/syzoj/problem.php @@ -513,7 +513,7 @@ if ($pr_flag) { $(".md").each(function () { - $(this).html(marked.parse($(this).html()).text()); + markdown_content = marked.parse($(this).html())); const md = window.markdownit(); md.set({ @@ -521,8 +521,9 @@ if ($pr_flag) { linkify: true, typographer: true, }) - $(this).html(md.render($(this).html()).text()); + markdown_content = md.render($(this).html()); + $(this).append(markdown_content) }); // adding note for ```input1 ```output1 in description for (let i = 1; i < 10; i++) {