Fast-time proving enforcement: booleans in the override file are written bare
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
883dcacf5e
commit
a86f1b54c8
1 changed files with 1 additions and 1 deletions
|
|
@ -88,7 +88,7 @@ const field = (name) => { const m = new RegExp(`"${name}":\\s*([0-9]+)`).exec(ba
|
|||
function mergeOverrideText(text, fields) {
|
||||
let out = text;
|
||||
for (const k of Object.keys(fields)) out = out.replace(new RegExp(`\\s*"${k}":\\s*[^,}\\n]+,?`), '');
|
||||
const extra = Object.entries(fields).map(([k, v]) => `"${k}": ${typeof v === 'string' && !/^\d+$/.test(v) ? JSON.stringify(v) : v}`).join(', ');
|
||||
const extra = Object.entries(fields).map(([k, v]) => `"${k}": ${typeof v === 'string' && !/^\d+$/.test(v) && v !== 'true' && v !== 'false' ? JSON.stringify(v) : v}`).join(', ');
|
||||
return out.replace(/,?\s*}\s*$/, `,\n ${extra}\n}\n`);
|
||||
}
|
||||
const DAY_MS = field('pow_day_ms');
|
||||
|
|
|
|||
Loading…
Reference in a new issue