Repository navigation
v0.8.1
Editing a section no longer restyles the note around it.
Fixes
edit_sectionsreplacekeeps the blank lines that framed the replaced span. A section's content span begins right after the heading line and runs to the next heading, so the blank line under the heading and the separator ahead of the following heading were inside whatreplaceoverwrote. Content that did not carry its own leading newline silently produced## Aimmediately followed by body text and body text immediately followed by the next heading — spacing every Markdown formatter, and markdownlint MD022, expects a note to keep. The replacement now restores the span's own leading and trailing blank-line runs.
Notes
- Only ever restores what was there: a document written without blank lines around its headings stays that way, and nothing is added at a seam the note did not have.
- Idempotent for round-trips. Content echoed back from
read_sectionsalready begins and ends with those separators, so they are not applied twice — a note does not grow a blank line per edit. - A span that is nothing but separator (a heading with an empty body) contributes one blank line to each side rather than duplicating the whole run, so filling in an empty section lands correctly spaced.
append,insert_before/insert_after, andmoveare unchanged — their placement and seam rules were already settled in ADR-0025.replacenow follows the same principle against an existing span.- Spans,
content_hash, overlap footprints, and the wire schema are untouched; only the bytesreplacewrites change.