From a829e8eac6e3b8fafa9ed3bc25c25b177e989ffc Mon Sep 17 00:00:00 2001 From: Will Kahn-Greene Date: Sat, 12 Sep 2026 13:27:43 -0400 Subject: [PATCH 01/15] docs: move the markdown body reference to docs/markdown.md The largest single subsection of the README (243 lines, 16% of the file) was a construct-by-construct reference for what the converter does with each markdown element. Nobody reads that top to bottom; they look one construct up. Moved verbatim to docs/markdown.md, where docs/confluence/ and docs/guarantees.md already live. The README keeps a short pointer naming what is supported and what is lossy, which is what a reader skimming it actually needs. Content moved unchanged on purpose. Retitling or restructuring it in the same commit would make the diff unreviewable as a move, and the bold run-in headings it uses are worth revisiting separately -- 240 lines under one heading is not much more navigable than it was in the README. Five README anchors pointed into the moved section (#body) and now point at the new file. Part of #102. --- README.md | 254 ++--------------------------------------------- docs/markdown.md | 250 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 261 insertions(+), 243 deletions(-) create mode 100644 docs/markdown.md diff --git a/README.md b/README.md index 6b5a4af..54838b6 100644 --- a/README.md +++ b/README.md @@ -422,8 +422,8 @@ sibling `.md` file that exists under the documentation root but has no the *current* file itself has no `page_id` yet, since it's internally treated as a link to itself — which can read as though the file names itself as missing; it doesn't, that's just this file before its first -publish (see [Links to sibling `.md` files](#body)). Other message shapes: -[`IMAGE BROKEN`/`LINK BROKEN`](#body), and `anchor not found: TARGET` for a +publish (see [links to sibling `.md` files](docs/markdown.md)). Other message shapes: +[`IMAGE BROKEN`/`LINK BROKEN`](docs/markdown.md), and `anchor not found: TARGET` for a `#fragment` that matches no heading. ```console @@ -805,7 +805,7 @@ notes.pdf 1.2 MB 1 application/pdf - ``` `NAME` is the name Confluence stores — for an image markfluence published, the -file's base name (see [Body](#body)) — and `SOURCE` is the Markdown image path +file's base name (see [docs/markdown.md](docs/markdown.md)) — and `SOURCE` is the Markdown image path it came from, recorded in the attachment's comment. The table shows at a glance which attachments a publish manages and which it will leave alone. @@ -1203,245 +1203,13 @@ over every real name in a tree. ### Body The body is [GitHub-Flavored Markdown](https://github.github.com/gfm/), converted -to Confluence storage format. Supported constructs: +to Confluence storage format: headings, lists, tables, fenced code blocks, links, +images, blockquotes, GitHub alert callouts, task lists, and inline HTML that maps +to storage. Pasted Confluence storage markup passes through untouched. -**Fenced code blocks** are rendered as Confluence code macros and support the -syntax highlighting, but only the languages Confluence supports. -[GFM fenced code](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks) - -**Tables** use GFM syntax and are rendered as Confluence tables. -[GFM tables](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables) - -**Table cell background colors** can be specified using an HTML comment at the -start of the cell. They will be invisible in Markdown preview, but will have -the specified background color in Confluence. - -```markdown -| Service | Status | -| ------- | -------------------------- | -| auth | ok | -| billing | down | -``` - -The color is a swatch name from the Confluence editor's cell background palette, -or a literal `#rrggbb` hex for anything else. The 21 swatches, one row here per -column of the editor's picker: - -| Light | Medium | Bold | -| --- | --- | --- | -| `white` `#ffffff` | `light-grey` `light-gray` `#f4f5f7` | `grey` `gray` `#b3bac5` | -| `light-blue` `#deebff` | `blue` `#b3d4ff` | `bold-blue` `#4c9aff` | -| `light-teal` `#e6fcff` | `teal` `#b3f5ff` | `bold-teal` `#79e2f2` | -| `light-green` `#e3fcef` | `green` `#abf5d1` | `bold-green` `#57d9a3` | -| `light-yellow` `#fffae6` | `yellow` `#fff0b3` | `bold-yellow` `#ffc400` | -| `light-red` `#ffebe6` | `red` `#ffbdad` | `bold-red` `#ff8f73` | -| `light-purple` `#eae6ff` | `purple` `#c0b6f2` | `bold-purple` `#998dd9` | - -Details: - -- Confluence colors **cells**, not rows or columns; a colored column is - implemented with a marker per cell in the column and a colored row is - implemented with a marker per cell in the row. -- The marker works in header cells too. -- A cell holding nothing but a marker is an empty colored cell. -- The color marker has to be the first thing in the cell. Anywhere else it's - ignored with a warning, since a stray comment would otherwise do nothing - visible. -- An unknown color name is dropped with a warning and the cell publishes - uncolored. - -**Multi-line table cells** use a literal `
` to break a cell onto more than -one line. A real newline can't be used instead, since a GFM table row has to -stay on one physical line. - -```markdown -| Field | Notes | -| ----- | -------------------------- | -| Key | Type: string
JQL: "Key" | -``` - -Confluence's own editor represents a multi-line cell as separate paragraphs -rather than `
`; `read`/`export` converts that back to the `
` form -shown above, which is what publishes back to the same paragraphs. - -**Lists in table cells** use HTML list tags — `