Skip to content

Bug: docs find-replace --format markdown silently does nothing #494

@shohei-majima

Description

@shohei-majima

Summary

docs find-replace --format markdown silently does nothing — no error, no replacement, no output. The same command works correctly with --format plain.

Steps to Reproduce

# 1. Write a placeholder to an existing doc
gog docs write <docId> --text "REPLACE_ME"

# 2. Try to replace with markdown formatting
gog docs find-replace <docId> "REPLACE_ME" "## Heading" --format markdown --first -v

# Output: only debug lines, no replacement count, no error
# time=... level=DEBUG msg="creating client options with custom scopes" ...
# time=... level=DEBUG msg="client options with custom scopes created successfully" ...

# 3. Verify — placeholder is still there
gog docs cat <docId>
# Output: REPLACE_ME

Expected Behavior

The placeholder text should be replaced with the markdown content, rendered as rich text (heading formatting applied).

Actual Behavior

  • No replacement occurs
  • No error message
  • No output (no replacements count shown)
  • The document remains unchanged

Working Comparison

# This works correctly:
gog docs find-replace <docId> "REPLACE_ME" "replaced" --format plain --first
# Output: replacements  1

Also tested with --content-file

gog docs find-replace <docId> "REPLACE_ME" --format markdown --first --content-file ./content.md

Same result — silently does nothing.

Environment

  • gogcli version: v0.12.0 (c18c58c 2026-03-09)
  • OS: macOS (arm64)

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions