Summary
When using gog docs write --replace --markdown --tab=<title> to rewrite a Google Doc tab from a markdown file, paragraph-level blank lines in the source are collapsed into soft line breaks ( two-space hard-break form) inside a single paragraph, instead of producing separate paragraph elements. The same source markdown rendered through gog docs write --replace --markdown --pageless (whole-doc, no --tab) does preserve paragraph breaks correctly — so it appears to be a --tab path regression.
Verified on gogcli v0.19.0 (Homebrew).
Repro
/tmp/in.md:
## Section heading
Paragraph A.
Paragraph B.
Paragraph C.
DOC_ID=... # any doc with a tab titled "Test"
gog docs write "$DOC_ID" --replace --markdown --tab "Test" --file /tmp/in.md
gog drive download "$DOC_ID" --format md --out /tmp/out.md
sed -n '/## Section/,$p' /tmp/out.md
Expected (paragraph breaks preserved)
## Section heading
Paragraph A.
Paragraph B.
Paragraph C.
Actual (paragraphs collapsed into soft line breaks)
## Section heading
Paragraph A.
Paragraph B.
Paragraph C.
The trailing two-space line-break in the round-trip export indicates the converter wrote these as a single Docs paragraph element with line breaks, not three separate paragraphs.
Comparison with whole-doc path
The same source markdown rendered via gog docs write --replace --markdown --pageless (no --tab flag) produces three separate paragraphs as expected. The behavioural delta is specific to the --tab path.
Impact
- Long-form status update tabs lose the visual structure they had when authored by hand.
- The first rewrite of any tab also re-flattens existing paragraphs that were authored manually, because the tab content is round-tripped through the converter.
- Doubling the blank lines in source (
\n\n\n) does not help — it appears the converter normalises blank line count to a single break.
Workaround
Convert paragraphs to bullet list items. Bullet items render with proper list-item spacing in Google Docs, sidestepping the paragraph-flattening behaviour. Not a fix — bullets are the wrong markup for narrative status updates.
Notes
+ and & escape as \+ and \& in the round-trip, but that is cosmetic in the markdown export and renders correctly in the Doc UI.
- Heading-level blank lines (around
###) are preserved correctly; the issue is purely paragraph-to-paragraph inside a section.
Summary
When using
gog docs write --replace --markdown --tab=<title>to rewrite a Google Doc tab from a markdown file, paragraph-level blank lines in the source are collapsed into soft line breaks (two-space hard-break form) inside a single paragraph, instead of producing separate paragraph elements. The same source markdown rendered throughgog docs write --replace --markdown --pageless(whole-doc, no--tab) does preserve paragraph breaks correctly — so it appears to be a--tabpath regression.Verified on gogcli v0.19.0 (Homebrew).
Repro
/tmp/in.md:Expected (paragraph breaks preserved)
Actual (paragraphs collapsed into soft line breaks)
The trailing two-space line-break in the round-trip export indicates the converter wrote these as a single Docs paragraph element with line breaks, not three separate paragraphs.
Comparison with whole-doc path
The same source markdown rendered via
gog docs write --replace --markdown --pageless(no--tabflag) produces three separate paragraphs as expected. The behavioural delta is specific to the--tabpath.Impact
\n\n\n) does not help — it appears the converter normalises blank line count to a single break.Workaround
Convert paragraphs to bullet list items. Bullet items render with proper list-item spacing in Google Docs, sidestepping the paragraph-flattening behaviour. Not a fix — bullets are the wrong markup for narrative status updates.
Notes
+and&escape as\+and\&in the round-trip, but that is cosmetic in the markdown export and renders correctly in the Doc UI.###) are preserved correctly; the issue is purely paragraph-to-paragraph inside a section.