| 110 | |
| 111 | |
| 112 | class _Lines: |
| 113 | def __init__(self, text: str) -> None: |
| 114 | self.starts = [0] + [m.end() for m in re.finditer("\n", text)] |
| 115 | |
| 116 | def of(self, offset: int) -> int: |
| 117 | return bisect.bisect_right(self.starts, offset) |
| 118 | |
| 119 | |
| 120 | def _liquid_files(root: Path) -> list[Path]: |