(root: Path)
| 353 | |
| 354 | |
| 355 | def cases_e(root: Path) -> list[Case]: |
| 356 | defined = _css_defined_classes(root) |
| 357 | out: list[Case] = [] |
| 358 | for p in _liquid_files(root): |
| 359 | masked = mask_inactive(_read(p)) |
| 360 | view_chars = list(masked) |
| 361 | for sp in _LIQUID_SPAN.finditer(masked): |
| 362 | _blank(masked, sp.start(), sp.end(), view_chars) |
| 363 | view = "".join(view_chars) |
| 364 | ln = _Lines(view) |
| 365 | rel = _rel(root, p) |
| 366 | for am in _CLASS_ATTR.finditer(view): |
| 367 | base = am.start(2) |
| 368 | for tm in _CLASS_TOKEN.finditer(am.group(2)): |
| 369 | tok = tm.group(0) |
| 370 | if _VALID_TOKEN.match(tok) and f".{tok}" in defined: |
| 371 | out.append((rel, ln.of(base + tm.start()), f".{tok}")) |
| 372 | return out |
| 373 | |
| 374 | |
| 375 | # --------------------------------------------------------------- definitions |
no test coverage detected