Skip to content

Commit ca07d5e

Browse files
committed
Fix testcases output
1 parent 30e8258 commit ca07d5e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backend/question-service/src/controllers/questionController.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,9 @@ const formatQuestionIndivResponse = async (question: IQuestion) => {
402402
const inputs = (await getFileContent(question.testcaseInputFileUrl))
403403
.replace(/\r\n/g, "\n")
404404
.split(testcaseDelimiter);
405-
const outputs = (await getFileContent(question.testcaseOutputFileUrl)).split(
406-
testcaseDelimiter,
407-
);
405+
const outputs = (await getFileContent(question.testcaseOutputFileUrl))
406+
.replace(/\r\n/g, "\n")
407+
.split(testcaseDelimiter);
408408
return {
409409
id: question._id,
410410
title: question.title,

0 commit comments

Comments
 (0)