Return True if this table block is a table-of-contents.
(table_lines: list[str])
| 56 | |
| 57 | |
| 58 | def is_toc_table(table_lines: list[str]) -> bool: |
| 59 | """Return True if this table block is a table-of-contents.""" |
| 60 | dot_lines = sum(1 for l in table_lines if is_toc_table_line(l)) |
| 61 | return dot_lines >= 2 # at least 2 rows with dot-fills = TOC |
| 62 | |
| 63 | |
| 64 | # Headings that precede a TOC table and should be removed with it |
no test coverage detected