CCT: accept IP solutions with matched single or double quotes, or none (#712)

This commit is contained in:
myCatsName 2023-08-06 07:13:01 -06:00 committed by GitHub
parent c4fe88e0c7
commit 647b78c9f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -537,7 +537,9 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [
}
const sanitizedAns: string = removeBracketsFromArrayString(ans).replace(/\s/g, "");
const ansArr: string[] = sanitizedAns.split(",").map((ip) => ip.replace(/^"|"$/g, ""));
const ansArr: string[] = sanitizedAns
.split(",")
.map((ip) => ip.replace(/^(?<quote>['"])([\d.]*)\k<quote>$/g, "$2"));
if (ansArr.length !== ret.length) {
return false;
}