MCPcopy Create free account
hub / github.com/RASAAS/docmcp-knowledge / is_table_data_line

Function is_table_data_line

scripts/fix_markdown_tables.py:25–34  ·  view source on GitHub ↗

Check if line looks like a table data row (contains | but is not a separator).

(line: str)

Source from the content-addressed store, hash-verified

23
24
25def is_table_data_line(line: str) -> bool:
26 """Check if line looks like a table data row (contains | but is not a separator)."""
27 stripped = line.strip()
28 if not stripped or stripped.startswith("#") or stripped.startswith(">"):
29 return False
30 if "|" not in stripped:
31 return False
32 if is_separator_line(stripped):
33 return False
34 return True
35
36
37def normalize_row(line: str, expected_cols: int = 0) -> str:

Callers 1

fix_tables_in_contentFunction · 0.85

Calls 1

is_separator_lineFunction · 0.85

Tested by

no test coverage detected