Skip to content

feat!: open a block only at a marker followed by a space, and drop setext headings - #37

Merged
plimeor merged 4 commits into
mainfrom
release/block-marker-needs-space
Oct 22, 2026
Merged

plimeor merged 4 commits into
mainfrom
release/block-marker-needs-space

Conversation

@plimeor

@plimeor plimeor commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Four changes, kept as separate commits so each lands in the changelog on its own.

feat!: open a block only at a marker followed by a space, and drop setext headings

A paragraph that starts with #, -, 1. or > and no space now reads as a paragraph, so text typed into one is not read back as another block. #, list markers and an opening > open a block only when followed by a space or tab. Inside an open quote, a bare > still continues it. Setext headings are gone. Decision 0019 supersedes 0018.

Breaking:

  • HeadingKind and Heading::kind are removed; Heading::with_source takes no kind; the wasm heading has no kind.
  • #, list markers and an opening > need a space or tab.
  • Empty blocks are written # , - , > .
  • Validation refuses items whose first line reads as a break with the bullet.

fix(serialize): write a fence's info string right after the fence

A code block written without its source now opens ```bash instead of ``` bash; the space stays only before an info string that opens with the fence's own char. Five canonical goldens move by that space.

fix(serialize): keep a table's rows when its alignments change, and blank lines and breaks moved in place

  • A table whose alignments changed keeps its rows' source and writes the new colons around the delimiter row's dashes in place (decision 0020 supersedes 0017).
  • Text given to a cell empty in the source takes one space on either side; a cell the source row lacks is written after the row with its pipe.
  • A --- break that comes to open the document keeps its source while no later line closes it as frontmatter.
  • A blank line that opened its container in the source no longer panics (subtraction overflow) or copies a wrong line when a block is put before it.
  • A block written first whose source opens with code indentation is rendered, as it is after another block.

feat(wasm): carry what character references and shortcodes stand for

A characterReference from the binding holds value (what CharacterReference::value() decodes) and a shortcode holds glyph (what Shortcode::glyph() gives), each null where Rust returns None. toMarkdown ignores them.


🤖 Generated with Claude Code

plimeor and others added 4 commits October 22, 2026 19:33
…text headings

A paragraph that starts with `#`, `-`, `1.` or `>` and no space now
reads as a paragraph, so text typed into one is not read back as
another block. Setext headings are gone. Inside an open quote, a bare
`>` still continues it. Decision 0019 supersedes 0018.

BREAKING CHANGE: setext headings are gone (HeadingKind and Heading::kind
removed, Heading::with_source takes no kind, the wasm heading has no
kind); `#`, list markers and an opening `>` need a space or tab; empty
blocks are written `# `, `- `, `> `; validation refuses items whose
first line reads as a break with the bullet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A code block written without its source opened ```` ``` bash ````; it now
opens ```` ```bash ````, with the space kept only before an info string
that opens with the fence's own char, which would lengthen the fence.
Five canonical goldens move by that space alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lank lines and breaks moved in place

- A table whose alignments changed keeps its rows' source and writes the
  new colons around the delimiter row's dashes in place (decision 0020,
  superseding 0017); the row is rendered where the columns changed or it
  would not read as a delimiter row.
- Text given to a cell empty in the source takes one space on either side
  in place of the padding between its pipes, and a cell the source row
  lacks is written after the row with its pipe.
- A `---` break that comes to open the document keeps its source while no
  later line closes it as frontmatter.
- A blank line that opened its container in the source no longer panics
  (subtraction overflow) or copies a wrong line when a block is put before
  it; it takes the canonical prefix.
- A block written first whose source opens with code indentation is
  rendered, as it is after another block.

The simulated edits gain a block put before each block and its blank
lines, new alignments, an added and a dropped column, and a filled empty
cell; the moved-block corpus test moves each block to the front.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A characterReference the binding returns holds `value`, the text
`CharacterReference::value()` decodes, and a shortcode holds `glyph`, the
emoji `Shortcode::glyph()` gives; each is null where Rust returns None.
They travel after the node's fields as an optional string; `toMarkdown`
ignores them and writes the node from its reference or name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@plimeor
plimeor merged commit db71b90 into main Oct 22, 2026
2 checks passed
@plimeor
plimeor deleted the release/block-marker-needs-space branch October 22, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant