From 143bac4baa9e62b13f42504175b9e1b0c90c4fec Mon Sep 17 00:00:00 2001 From: nr0728 <88932464+nr0728@users.noreply.github.com> Date: Tue, 30 Jul 2024 16:26:02 +0800 Subject: [PATCH] vjudge: codeforces: support katex for problems in old contests (#846) --- packages/vjudge/src/providers/codeforces.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/vjudge/src/providers/codeforces.ts b/packages/vjudge/src/providers/codeforces.ts index c82be9138..d95abb33e 100644 --- a/packages/vjudge/src/providers/codeforces.ts +++ b/packages/vjudge/src/providers/codeforces.ts @@ -216,19 +216,19 @@ export default class CodeforcesProvider extends BasicFetcher implements IBasicPr difficulty: getDifficulty(tag), content: buildContent([ { - type: 'Text', sectionTitle: 'Description', subType: 'markdown', text: description, + type: 'Text', sectionTitle: 'Description', subType: 'markdown', text: description.replace(/tex-span/g, 'katex'), }, ...input ? [{ - type: 'Text', sectionTitle: 'Input', subType: 'markdown', text: input, + type: 'Text', sectionTitle: 'Input', subType: 'markdown', text: input.replace(/tex-span/g, 'katex'), }] : [], ...output ? [{ - type: 'Text', sectionTitle: 'Output', subType: 'markdown', text: output, + type: 'Text', sectionTitle: 'Output', subType: 'markdown', text: output.replace(/tex-span/g, 'katex'), }] : [], ...inputs.length ? [{ type: 'Plain', text: [...inputs, ...outputs].join('\n'), }] : [] as any, ...note ? [{ - type: 'Text', sectionTitle: 'Note', subType: 'markdown', text: note, + type: 'Text', sectionTitle: 'Note', subType: 'markdown', text: note.replace(/tex-span/g, 'katex'), }] : [], ]), };