Skip to content

feat(docs): add --tab support for markdown find-replace and append#541

Closed
donbowman wants to merge 1 commit intoopenclaw:mainfrom
donbowman:add-markdown-find-replace
Closed

feat(docs): add --tab support for markdown find-replace and append#541
donbowman wants to merge 1 commit intoopenclaw:mainfrom
donbowman:add-markdown-find-replace

Conversation

@donbowman
Copy link
Copy Markdown
Contributor

Enables gog docs find-replace --format markdown --tab <TAB_ID> to render markdown into specific tabs of multi-tab Google Docs, addressing the automation workflow requested in #537.

Changes:

  • Remove blocking error preventing --tab with --format markdown
  • Propagate tabID through markdown rendering pipeline:
    • replaceDocsMarkdownRange, insertDocsMarkdownAt
    • MarkdownToDocsRequests, buildTextStyleRequest
    • InsertNativeTable, buildImageInsertRequests
    • insertImagesIntoDocs, cleanupDocsImagePlaceholders
  • Add TabId to all Range and Location objects in formatting requests
  • Enable --tab with --markdown --append for docs write
  • Add test coverage in docs_tab_edit_test.go

Note: update --markdown --replace --tab remains unsupported by design, as Drive's markdown converter API operates on entire documents and doesn't support tab-specific updates (Google API limitation).

Fixes #537

Enables `gog docs find-replace --format markdown --tab <TAB_ID>` to
render markdown into specific tabs of multi-tab Google Docs, addressing
the automation workflow requested in openclaw#537.

Changes:
- Remove blocking error preventing --tab with --format markdown
- Propagate tabID through markdown rendering pipeline:
  - replaceDocsMarkdownRange, insertDocsMarkdownAt
  - MarkdownToDocsRequests, buildTextStyleRequest
  - InsertNativeTable, buildImageInsertRequests
  - insertImagesIntoDocs, cleanupDocsImagePlaceholders
- Add TabId to all Range and Location objects in formatting requests
- Enable --tab with --markdown --append for docs write
- Add test coverage in docs_tab_edit_test.go

Note: update --markdown --replace --tab remains unsupported by design, as
Drive's markdown converter API operates on entire documents and doesn't
support tab-specific updates (Google API limitation).

Fixes openclaw#537
@steipete
Copy link
Copy Markdown
Collaborator

steipete commented May 4, 2026

Thanks for the PR. The tab-aware markdown find-replace/write work is already on main as 6867fe8 (feat(docs): add tab-aware editing fixes), including the tab-aware markdown path and regression coverage.

Verified current origin/main with go test ./internal/cmd -run TestDocsEditingCommands_WithTab; I also closed #537 with the same proof. Closing this PR as superseded by main, with attribution preserved in the changelog.

@steipete steipete closed this May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support --tab with --format markdown in docs find-replace

2 participants