Files
BFlat 5185f36ab0 Import maps, speculation rules and data blocks aren't read as JavaScript (#353)
The HTML scanner skipped only `<script>` bodies whose type mentioned "json" or "template". Import maps (`importmap`), speculation rules (`speculationrules`) and data blocks such as `text/html` became JavaScript modules in app maps: an import map was reported as a broken script, and an inert HTML template could add made-up fetch endpoints.

A `<script>` now counts as a script only when the page runs it as code: no type, `module`, or a JavaScript MIME type (parameters such as `; charset=…` are ignored), plus `text/babel` and `text/jsx`, which in-browser Babel runs. Other types are left out, both inline and with `src`.

**Verified:** a new scanner test. Five non-JavaScript types (inline and with `src`) give no scripts; six JavaScript spellings, including a mixed-case type and one with a charset, give one each. `cargo test -p craft-anything-js` (41) and `-p craft-anything-analysis` (85), clippy and fmt pass.

**Not run:** `cargo xtask wasm`. The change is pure string logic in an existing function.

Fixes #285
2026-11-02 15:42:22 +07:00
..
2026-10-31 10:52:14 -04:00
2026-10-31 10:52:14 -04:00
2026-10-31 10:52:14 -04:00
2026-10-31 10:52:14 -04:00
2026-10-31 10:52:14 -04:00
2026-10-31 10:52:14 -04:00
2026-10-31 10:52:14 -04:00
2026-10-31 10:52:14 -04:00
2026-10-31 10:52:14 -04:00
2026-10-31 10:52:14 -04:00
2026-10-31 10:52:14 -04:00
2026-10-31 10:52:14 -04:00
2026-10-31 10:52:14 -04:00