We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2141b0f commit b431b11Copy full SHA for b431b11
backend/question-service/src/controllers/questionController.ts
@@ -398,10 +398,10 @@ const formatQuestionResponse = (question: IQuestion) => {
398
};
399
400
const formatQuestionIndivResponse = async (question: IQuestion) => {
401
- const testcaseDelimiter = "\n";
402
- const inputs = (await getFileContent(question.testcaseInputFileUrl)).split(
403
- testcaseDelimiter,
404
- );
+ const testcaseDelimiter = "\n\n";
+ const inputs = (await getFileContent(question.testcaseInputFileUrl))
+ .replace(/\r\n/g, "\n")
+ .split(testcaseDelimiter);
405
const outputs = (await getFileContent(question.testcaseOutputFileUrl)).split(
406
testcaseDelimiter,
407
);
0 commit comments