${ch.hero_h2}
+${ch.hero_p}
+diff --git a/backend/scripts/check_geom11_js.js b/backend/scripts/check_geom11_js.js new file mode 100644 index 0000000..db57d18 --- /dev/null +++ b/backend/scripts/check_geom11_js.js @@ -0,0 +1,49 @@ +'use strict'; +const fs = require('fs'); +const path = require('path'); + +const files = [ + '../../frontend/js/g3d.js', + '../../frontend/textbooks/geometry_11_hub.html', + '../../frontend/textbooks/geometry_11_ch1.html', + '../../frontend/textbooks/geometry_11_ch2.html', + '../../frontend/textbooks/geometry_11_ch3.html', + '../../frontend/textbooks/geometry_11_ch4.html', +]; + +let totalErrors = 0; + +for (const rel of files) { + const p = path.join(__dirname, rel); + const src = fs.readFileSync(p, 'utf8'); + if (rel.endsWith('.js')) { + // pure JS file + try { + new Function(src); + console.log('OK (parse) ' + rel); + } catch (e) { + totalErrors++; + console.error('FAIL ' + rel + ':\n' + e.message); + } + continue; + } + // Extract all inline bodies (skip src= scripts) + const re = / + + + + + + + +
+ +${ch.hero_p}
+