diff --git a/README.md b/README.md
index 8c27c82a3..5ed04bd92 100644
--- a/README.md
+++ b/README.md
@@ -633,6 +633,7 @@ graphify-out/
/graphify ./raw # run on a specific folder
/graphify ./raw --mode deep # more aggressive relationship extraction
graphify extract ./raw --code-only # index code only — local AST, no API key (skips docs/PDFs/images); an `extract` flag, not a skill flag
+graphify extract ./raw --html-as-code # treat .html as code (embedded )""",
+ re.IGNORECASE,
+)
+
+_HTML_SCRIPT_TYPE_RE = re.compile(r"""\btype\s*=\s*(?:"([^"]*)"|'([^']*)'|(\S+))""", re.IGNORECASE)
+_HTML_SCRIPT_SRC_RE = re.compile(r"""\bsrc\s*=""", re.IGNORECASE)
+
+# type="" values that mean "this is executable JS". Absent type defaults to JS
+# per the HTML spec. Anything else (application/json, text/template,
+# application/ld+json, ...) is data or a client-side template, not JS, and
+# must not be fed to the tree-sitter JS grammar.
+_HTML_SCRIPT_JS_TYPES = frozenset({
+ "", "text/javascript", "application/javascript", "application/x-javascript",
+ "text/ecmascript", "application/ecmascript", "module",
+})
+
+
+def _html_mask_non_script(src: str) -> str:
+ """Blank everything outside inline, JS-typed ``