Textsystem: Bis-Strich mit Leerzeichen (Zahl – Zahl) per Agent-Sweep
562 Ersetzungen in 50 Dateien: Halbgeviertstrich zwischen zwei Ziffern (= "bis"-Bereich) bekommt Leerzeichen davor/danach (3–4 -> 3 – 4). Regex /([0-9])\s*–\s*(?=[0-9])/ auf Rohtext (format-erhaltend, CRLF/Einrueckung unveraendert), Bindestriche in Woertern und Minuszeichen unangetastet, alle JSON weiter gueltig. Energiemanager-Zeitbloecke sind Display-Labels (kein Logik-Key) -> safe. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
const { chromium } = require('@playwright/test');
|
||||
(async () => {
|
||||
const b = await chromium.launch(); const p = await b.newPage();
|
||||
const errs=[]; p.on('pageerror',e=>errs.push(e.message)); p.on('console',m=>{if(m.type()==='error')errs.push(m.text());});
|
||||
await p.goto('http://localhost/geograsim/App/sims/weltkueche/game.html');
|
||||
await p.waitForTimeout(1500);
|
||||
const r = await p.evaluate(async () => {
|
||||
try {
|
||||
if (!DISHES.length) await loadWeltkuecheData();
|
||||
function taskFor(ingKey, heimat){
|
||||
current = { dish: { id:'test-'+ingKey, heimat: heimat, ings:[ingKey], signature:{} } };
|
||||
try { delete _taskCache[ingKey]; } catch(_){}
|
||||
return buildTaskFor(ingKey);
|
||||
}
|
||||
const dEggsDE = _wkDist('oesterreich','deutschland');
|
||||
const dEggsFR = _wkDist('oesterreich','frankreich');
|
||||
const eier = taskFor('eier','oesterreich');
|
||||
const kart = taskFor('kartoffel','oesterreich');
|
||||
const milch = taskFor('milch','oesterreich');
|
||||
// alle Zutaten müssen fehlerfrei bauen
|
||||
let buildErr = null;
|
||||
for (const k of Object.keys(ING)) {
|
||||
current = { dish:{id:'x',heimat:'oesterreich',ings:[k],signature:{}} };
|
||||
try { delete _taskCache[k]; buildTaskFor(k); } catch(e){ buildErr = k+': '+e.message; break; }
|
||||
}
|
||||
return {
|
||||
distDE: Math.round(dEggsDE), distFR: Math.round(dEggsFR),
|
||||
eierCorrect: eier.correct, eierChoices: eier.choices,
|
||||
eierDistractors: eier.choices.length - eier.correct.length,
|
||||
kartoffelCorrect: kart.correct,
|
||||
milchCorrect: milch.correct,
|
||||
buildErr, ingCount: Object.keys(ING).length,
|
||||
};
|
||||
} catch(e){ return { error:String(e), stack:e.stack }; }
|
||||
});
|
||||
console.log(JSON.stringify({result:r, pageErrors:errs}, null, 2));
|
||||
await b.close();
|
||||
})();
|
||||
Reference in New Issue
Block a user