mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 01:23:49 +01:00
CCT: accept IP solutions with matched single or double quotes, or none (#712)
This commit is contained in:
parent
c4fe88e0c7
commit
647b78c9f7
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user