Summary
gog docs find-replace <docId> <find> <replace> --format markdown (and --content-file) successfully renders block-level structure but leaks inline / block formatting as literal markdown characters. The fix in #494 wired up the rendering path, but the converter itself doesn't handle several common markdown constructs.
What works
- ATX headings (
#, ##, ###) → HEADING_1 / HEADING_2 / HEADING_3
- Bullet lists (
- item)
- Pipe tables → TABLE element
What leaks as literal text
- Italic
_text_ → underscores remain visible
- Bold
**text** inside paragraphs → asterisks remain visible
- Blockquote
> text → > lands as a literal character on its own line (breaks the callout)
- Fenced code blocks (
```lang … ```) → flat plain paragraphs, no monospace, no grey background
- Inline emphasis combinations (e.g.
**bold _and italic_**)
Repro (v0.16.0, macOS arm64)
cat > /tmp/repro.md <<'EOF'
## Heading works
This has **bold** and _italic_ and a `code span`.
> blockquote should be a callout
```python
print("hello")
```
EOF
DOC=$(gog docs create "gogcli md repro" --json | jq -r .id)
gog docs write "$DOC" --text "REPLACE_ME"
gog docs find-replace "$DOC" "REPLACE_ME" --content-file /tmp/repro.md --format markdown
gog docs cat "$DOC"
Observed on a 30-page document today: 1 H1, 5 H2, 23 H3, 1 table all correct; every **…**, _…_, > …, and fenced code block leaked as raw markdown.
Expected
Match the fidelity of pasting the same .md into Google Docs UI via Edit > Paste from Markdown (which renders all of the above correctly).
Environment
Summary
gog docs find-replace <docId> <find> <replace> --format markdown(and--content-file) successfully renders block-level structure but leaks inline / block formatting as literal markdown characters. The fix in #494 wired up the rendering path, but the converter itself doesn't handle several common markdown constructs.What works
#,##,###) → HEADING_1 / HEADING_2 / HEADING_3- item)What leaks as literal text
_text_→ underscores remain visible**text**inside paragraphs → asterisks remain visible> text→>lands as a literal character on its own line (breaks the callout)```lang … ```) → flat plain paragraphs, no monospace, no grey background**bold _and italic_**)Repro (v0.16.0, macOS arm64)
Observed on a 30-page document today: 1 H1, 5 H2, 23 H3, 1 table all correct; every
**…**,_…_,> …, and fenced code block leaked as raw markdown.Expected
Match the fidelity of pasting the same
.mdinto Google Docs UI via Edit > Paste from Markdown (which renders all of the above correctly).Environment
gogv0.16.0 (280eea7), macOS arm64