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,27 @@
|
||||
const { chromium } = require('@playwright/test');
|
||||
(async () => {
|
||||
const browser = await chromium.launch();
|
||||
const page = await browser.newPage();
|
||||
const errors = [];
|
||||
page.on('console', m => { if (m.type()==='error') errors.push(m.text()); });
|
||||
page.on('pageerror', e => errors.push('PAGEERROR: '+e.message));
|
||||
await page.goto('http://localhost/geograsim/App/sims/weltkueche/game.html');
|
||||
await page.waitForTimeout(1500);
|
||||
const r = await page.evaluate(async () => {
|
||||
try {
|
||||
if (!DISHES.length) await loadWeltkuecheData();
|
||||
const dish = DISHES.find(d => d.id === 'tiroler-groestl');
|
||||
if (!dish) return { error: 'no tiroler-groestl dish' };
|
||||
current = { dish };
|
||||
const task = buildTaskFor('kartoffel');
|
||||
const art = ING.kartoffel.art;
|
||||
const correctAT = explainChoice('kartoffel', 'oesterreich', true).text;
|
||||
const correctDE = explainChoice('kartoffel', 'deutschland', true).text;
|
||||
const wrongUA = explainChoice('kartoffel', 'ukraine', false).text;
|
||||
const bad = Object.entries(ING).filter(([k,v]) => !['der','die','das'].includes(v && v.art)).map(([k])=>k);
|
||||
return { art, taskCorrect: task.correct, correctAT, correctDE, wrongUA, badArticles: bad, ingCount: Object.keys(ING).length };
|
||||
} catch (e) { return { error: String(e), stack: e.stack }; }
|
||||
});
|
||||
console.log(JSON.stringify({ result: r, consoleErrors: errors }, null, 2));
|
||||
await browser.close();
|
||||
})();
|
||||
Reference in New Issue
Block a user