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,29 @@
|
||||
const { chromium } = require('@playwright/test');
|
||||
(async () => {
|
||||
const browser = await chromium.launch();
|
||||
const page = await browser.newPage();
|
||||
const r = await page.request.get('https://geograsim.at/teacher.html');
|
||||
const html = await r.text();
|
||||
|
||||
// 1) Static tab-bar markup
|
||||
const tb = html.indexOf('id="tab-bar"');
|
||||
console.log('--- #tab-bar markup ---');
|
||||
console.log(tb >= 0 ? html.slice(tb - 40, tb + 700) : 'tab-bar id NOT found');
|
||||
|
||||
// 2) Extract _liveQualityBar function body and run it in isolation
|
||||
const start = html.indexOf('function _liveQualityBar');
|
||||
// find matching braces
|
||||
let i = html.indexOf('{', start), depth = 0, end = -1;
|
||||
for (; i < html.length; i++) {
|
||||
if (html[i] === '{') depth++;
|
||||
else if (html[i] === '}') { depth--; if (depth === 0) { end = i + 1; break; } }
|
||||
}
|
||||
const fnSrc = html.slice(start, end);
|
||||
const fn = new Function(fnSrc + '\nreturn _liveQualityBar;')();
|
||||
const sample = fn(8, 2);
|
||||
console.log('\n--- _liveQualityBar(8,2) OUTPUT ---');
|
||||
console.log(sample);
|
||||
console.log('\ncontains "80":', String(sample).includes('80'));
|
||||
|
||||
await browser.close();
|
||||
})();
|
||||
Reference in New Issue
Block a user