Functions
_extract_oob_regions
1
list[str]
▼
Extract the inner content of each OOB element by tracking tag nesting.
Limitat…
_extract_oob_regions
1
list[str]
▼
def _extract_oob_regions(source: str) -> list[str]
Extract the inner content of each OOB element by tracking tag nesting.
Limitations (regex-based HTML parsing):
- Cannot see blocks inherited via
{% extends %}or pulled in via{% include %}— only the literal source of each template is scanned. - HTML comments or template conditionals that split tags may confuse the nesting tracker, though this is rare in practice.
Parameters
| Name | Type | Description |
|---|---|---|
source |
str |
Returns
list[str]
check_boundary_coverage
1
list[ContractIssue]
▼
Suggest error boundaries for blocks inside OOB elements.
Only inspects blocks …
check_boundary_coverage
1
list[ContractIssue]
▼
def check_boundary_coverage(template_sources: dict[str, str]) -> list[ContractIssue]
Suggest error boundaries for blocks inside OOB elements.
Only inspects blocks that are inside elements withhx-swap-oob
attributes (explicit OOB swap targets). Blocks outside OOB regions in the
same template are not flagged. Does not cover Suspense-rendered OOB
(those wrappers are generated at render time, not in the source).
Parameters
| Name | Type | Description |
|---|---|---|
template_sources |
dict[str, str] |
Returns
list[ContractIssue]