diff --git a/src/pages/api/submissions/index.ts b/src/pages/api/submissions/index.ts index 31d63a8..9af456f 100644 --- a/src/pages/api/submissions/index.ts +++ b/src/pages/api/submissions/index.ts @@ -48,6 +48,9 @@ export const POST: APIRoute = async ({ request }) => { if (language !== 'python') { code = code.replace(/\s+/g, ' '); } + // Normalize case so "Int", "String", "Char", "Printf" etc. + // are treated the same as "int", "string", "char", "printf" + code = code.toLowerCase(); return code; }; const normalizedSubmitted = normalizeCode(submittedCode, challenge.language);