Skip to content

Commit b431b11

Browse files
committed
Change separator for test files
1 parent 2141b0f commit b431b11

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -398,10 +398,10 @@ const formatQuestionResponse = (question: IQuestion) => {
398398
};
399399

400400
const formatQuestionIndivResponse = async (question: IQuestion) => {
401-
const testcaseDelimiter = "\n";
402-
const inputs = (await getFileContent(question.testcaseInputFileUrl)).split(
403-
testcaseDelimiter,
404-
);
401+
const testcaseDelimiter = "\n\n";
402+
const inputs = (await getFileContent(question.testcaseInputFileUrl))
403+
.replace(/\r\n/g, "\n")
404+
.split(testcaseDelimiter);
405405
const outputs = (await getFileContent(question.testcaseOutputFileUrl)).split(
406406
testcaseDelimiter,
407407
);

0 commit comments

Comments
 (0)