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

Function parse_table_row

scripts/postprocess_fulltext.py:301–309  ·  view source on GitHub ↗

Parse a Markdown table row into a list of cell strings.

(line: str)

Source from the content-addressed store, hash-verified

299# ── repeated-column table cleanup ────────────────────────────────────────────
300
301def parse_table_row(line: str) -> list[str]:
302 """Parse a Markdown table row into a list of cell strings."""
303 # Strip leading/trailing | and split
304 stripped = line.strip()
305 if stripped.startswith('|'):
306 stripped = stripped[1:]
307 if stripped.endswith('|'):
308 stripped = stripped[:-1]
309 return [c.strip() for c in stripped.split('|')]
310
311
312def is_separator_row(line: str) -> bool:

Callers 2

merge_fragmented_tablesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected