diff --git a/src/data/codingcontracttypes.ts b/src/data/codingcontracttypes.ts index e8dfbea88..546cc573b 100644 --- a/src/data/codingcontracttypes.ts +++ b/src/data/codingcontracttypes.ts @@ -490,8 +490,8 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [ "Note that an octet cannot begin with a '0' unless the number", "itself is actually 0. For example, '192.168.010.1' is not a valid IP.\n\n", "Examples:\n\n", - "25525511135 -> [255.255.11.135, 255.255.111.35]\n", - "1938718066 -> [193.87.180.66]", + '25525511135 -> ["255.255.11.135", "255.255.111.35"]\n', + '1938718066 -> ["193.87.180.66"]', ].join(" "); }, difficulty: 3, @@ -532,7 +532,7 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [ } const sanitizedAns: string = removeBracketsFromArrayString(ans).replace(/\s/g, ""); - const ansArr: string[] = sanitizedAns.split(","); + const ansArr: string[] = sanitizedAns.split(",").map((ip) => ip.replace(/^"|"$/g, "")); if (ansArr.length !== ret.length) { return false; }