vjudge: codeforces: support katex for problems in old contests (#846)

This commit is contained in:
nr0728 authored and GitHub committed 2024-07-30 16:26:02 +08:00
1 parent 41a949348b
commit 143bac4baa
1 file changed
+4 -4
+4 -4
View File
@@ -216,19 +216,19 @@ export default class CodeforcesProvider extends BasicFetcher implements IBasicPr
difficulty: getDifficulty(tag), difficulty: getDifficulty(tag),
content: buildContent([ content: buildContent([
{ {
type: 'Text', sectionTitle: 'Description', subType: 'markdown', text: description, type: 'Text', sectionTitle: 'Description', subType: 'markdown', text: description.replace(/tex-span/g, 'katex'),
}, },
...input ? [{ ...input ? [{
type: 'Text', sectionTitle: 'Input', subType: 'markdown', text: input, type: 'Text', sectionTitle: 'Input', subType: 'markdown', text: input.replace(/tex-span/g, 'katex'),
}] : [], }] : [],
...output ? [{ ...output ? [{
type: 'Text', sectionTitle: 'Output', subType: 'markdown', text: output, type: 'Text', sectionTitle: 'Output', subType: 'markdown', text: output.replace(/tex-span/g, 'katex'),
}] : [], }] : [],
...inputs.length ? [{ ...inputs.length ? [{
type: 'Plain', text: [...inputs, ...outputs].join('\n'), type: 'Plain', text: [...inputs, ...outputs].join('\n'),
}] : [] as any, }] : [] as any,
...note ? [{ ...note ? [{
type: 'Text', sectionTitle: 'Note', subType: 'markdown', text: note, type: 'Text', sectionTitle: 'Note', subType: 'markdown', text: note.replace(/tex-span/g, 'katex'),
}] : [], }] : [],
]), ]),
}; };