Skip to content

v0.8.1

Choose a tag to compare

@zekaizer zekaizer released this 12 Aug 04:48
· 88 commits to main since this release

Editing a section no longer restyles the note around it.

Fixes

  • edit_sections replace keeps 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 what replace overwrote. Content that did not carry its own leading newline silently produced ## A immediately 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_sections already 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, and move are unchanged — their placement and seam rules were already settled in ADR-0025. replace now follows the same principle against an existing span.
  • Spans, content_hash, overlap footprints, and the wire schema are untouched; only the bytes replace writes change.