fix: add URL-to-ID extraction, comment_mode validation, and pipe escaping
Address CodeRabbit review feedback: - Extract doc ID from full Google Docs URLs (e.g. /d/<id>/) - Validate comment_mode against allowed values - Escape pipe characters in table cell text Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -194,7 +194,8 @@ def _extract_cell_text(cell: dict[str, Any]) -> str:
|
||||
text = _convert_paragraph_text(content_elem["paragraph"])
|
||||
if text.strip():
|
||||
parts.append(text.strip())
|
||||
return " ".join(parts)
|
||||
cell_text = " ".join(parts)
|
||||
return cell_text.replace("|", "\\|")
|
||||
|
||||
|
||||
def format_comments_inline(markdown: str, comments: list[dict[str, Any]]) -> str:
|
||||
|
||||
Reference in New Issue
Block a user