|
| 1 | +# Goal 0042 — Confluence markdown fidelity, pass 2: close the pinned degradations |
| 2 | + |
| 3 | +Owner-picked 2026-08-13 from the post-0041 planning round. Successor |
| 4 | +to goal 0021 Phase 4's first pass (PR #78), which fixed the |
| 5 | +table-structure loss and pinned five known degradations as goldens in |
| 6 | +`internal/adapters/markdown/testdata/confluence/` with named |
| 7 | +follow-up candidates. This goal implements those five. |
| 8 | + |
| 9 | +## Goal |
| 10 | + |
| 11 | +The five degradations the corpus currently pins become correct |
| 12 | +conversions, each proven by updating its existing golden: |
| 13 | + |
| 14 | +1. **Code-block language hint** — parse Confluence's |
| 15 | + `data-syntaxhighlighter-params="brush: java; ..."` into a fenced |
| 16 | + block's language (` ```java `), the shim the reference Python |
| 17 | + exporter hand-rolls for the same reason (the library only reads |
| 18 | + `language-*` classes). |
| 19 | +2. **Task-list checkboxes** — `ul.ak-task-list` / |
| 20 | + `li[data-task-state]` becomes GFM `- [ ]` / `- [x]`. |
| 21 | +3. **Emoji fallback** — `img.emoticon[data-emoji-fallback]` emits the |
| 22 | + fallback text/emoji instead of today's dead relative image link |
| 23 | + (currently the worst-case output: worse than dropping). |
| 24 | +4. **Panel type** — info/note/warning/tip panels keep their type in |
| 25 | + the output (blockquote with a leading bold label, e.g. |
| 26 | + `> **Warning:** ...` — match what confluence-markdown exporters |
| 27 | + converge on rather than inventing). |
| 28 | +5. **Expand macro** — `div.expand-container` becomes |
| 29 | + `<details><summary>` (HTML-in-markdown is valid GFM; the reference |
| 30 | + exporter does exactly this). |
| 31 | + |
| 32 | +## Plan |
| 33 | + |
| 34 | +Custom rules registered on the adapter's converter (the library's v2 |
| 35 | +Register API), Mill-owned code in `internal/adapters/markdown/` — |
| 36 | +commodity library, domain-owned conversion policy, consistent with |
| 37 | +the ports/adapters boundary. Check the library's own extension docs |
| 38 | +for the idiomatic registration shape before writing. Each rule's |
| 39 | +fixture golden updates in the same change; the corpus test is the |
| 40 | +proof. Delegated build once scoped; the five selectors and reference |
| 41 | +behaviors are recorded in goal 0021's Phase 4 research section. |
| 42 | + |
| 43 | +## Acceptance (checkable) |
| 44 | + |
| 45 | +- [ ] All five cases' goldens show the corrected output (no |
| 46 | + pinned-degradation wording left for them in the test names). |
| 47 | +- [ ] The seven already-correct cases' goldens unchanged. |
| 48 | +- [ ] Full local gate suite green; PR merged green. |
| 49 | +- [ ] Goal 0021's Phase 4 assessment table updated to reflect the new |
| 50 | + verdicts (this goal referenced from there). |
0 commit comments