Skip to content

docs write --append --markdown: inline markdown inside table cells (bold/italic/code) renders literally #608

@chrischall

Description

@chrischall

Summary

When gog docs write --append --markdown is given a table with inline markdown formatting inside cells (**bold**, *italic*, `code`), the markup is rendered as literal characters rather than being applied as character runs on the cell text.

Reported by my AI agent (Claude Code) while building MCP coverage on top of gogcli.

Related to closed #586 (docs find-replace --format markdown leaks inline / block markdown as literal text), but in the write --append code path and specifically inside table cells.

Repro

cat > /tmp/repro.md <<'MD'
| Field | Value |
|-------|-------|
| Name  | **Alice** |
| Note  | *important* |
| Code  | `xyz123` |
MD

DOC=$(gog docs create "MD inline-md repro" --json | jq -r '.file.id')
gog docs write "$DOC" --append --markdown --file=/tmp/repro.md
gog docs cat "$DOC" --json | jq -r '.text'

Expected

A 2×4 table where "Alice" is bold, "important" is italic, "xyz123" is monospace.

Actual

Cells contain the literal strings **Alice**, *important*, `xyz123` — the markers are not stripped and no character formatting is applied.

Field	Value
Name	**Alice**
Note	*important*
Code	`xyz123`

Build

v0.17.0 (aee7460 2026-05-15T18:10:07Z) (macOS, Homebrew install)

Notes

  • Headings, paragraphs, and standalone bold/italic/code OUTSIDE of tables render fine in the same write --append --markdown invocation. The issue is specific to inline formatting inside table cells.
  • Looks like cell text is being passed through to the Docs API as a single InsertText run without the inline-formatting expansion that the rest of the converter applies.

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