15 - refuse the directive link spelling no href #103

Merged
lilleman merged 4 commits from href-less-directive-link into main 2026-09-18 23:26:05 +02:00
4 changed files with 3 additions and 6 deletions
Showing only changes of commit b695c4c88c - Show all commits
+1 -1
View File
@@ -102,7 +102,7 @@ emit refuses:
| `unspellable-line-start` | a paragraph line begins with a code span whose backticks would read back as a code fence | put any text before the code span | | `unspellable-line-start` | a paragraph line begins with a code span whose backticks would read back as a code fence | put any text before the code span |
| `unspellable-whitespace` | an `emoji`, `mention` or `status` holds a newline in the text its inline directive spells in the content slot | replace it with a space — an inline directive never spans lines | | `unspellable-whitespace` | an `emoji`, `mention` or `status` holds a newline in the text its inline directive spells in the content slot | replace it with a space — an inline directive never spans lines |
| `unsupported-nesting-depth` | blocks, marks, an attribute's JSON or a carried node's JSON nest past 500 levels | keep the ADF and pass the document over, or show it read-only; flatten the input where you are the one who wrote it | | `unsupported-nesting-depth` | blocks, marks, an attribute's JSON or a carried node's JSON nest past 500 levels | keep the ADF and pass the document over, or show it read-only; flatten the input where you are the one who wrote it |
| `unsupported-node-shape` | a node carries an attribute, value, argument or body its type does not take — or markdown writes as a directive a node or mark the flavour spells as CommonMark | write the shape the message names; `spec/flavour.md` lists every type's attributes and body | | `unsupported-node-shape` | a node carries an attribute, value, argument or body its type does not take, or lacks one it needs — or markdown writes as a directive a node or mark the flavour spells as CommonMark | write the shape the message names; `spec/flavour.md` lists every type's attributes and body |
## The guarantees ## The guarantees
+1 -1
View File
@@ -474,7 +474,7 @@ the inline directive `!adf:link[text]{attrs}` only where CommonMark does not: an
backslash, an entity reference, an angle bracket beside a space or opening a bare destination, a backslash, an entity reference, an angle bracket beside a space or opening a bare destination, a
newline in the title), or a link opening a paragraph whose markdown spelling would read as a link newline in the title), or a link opening a paragraph whose markdown spelling would read as a link
reference definition. Every such spelling carries an `href`: a directive link CommonMark could reference definition. Every such spelling carries an `href`: a directive link CommonMark could
spell is a named error, and so is one spelling no `href`, the mark without one riding the carry. spell is a named error, and so is one spelling none.
- `border` — Attributes: `color` (string, `#rrggbb` or `#rrggbbaa`), `size` (number, 1–3). - `border` — Attributes: `color` (string, `#rrggbb` or `#rrggbbaa`), `size` (number, 1–3).
- `code`, `em`, `strike`, `strong` — Attributes: none. - `code`, `em`, `strike`, `strong` — Attributes: none.
@@ -996,8 +996,6 @@ test('names the href the directive link spells no value for', () => {
assert.equal(content(markdownToAdf('!adf:link[a]\n')), named) assert.equal(content(markdownToAdf('!adf:link[a]\n')), named)
assert.equal(content(markdownToAdf('!adf:link[a]{title=t}\n')), named) assert.equal(content(markdownToAdf('!adf:link[a]{title=t}\n')), named)
assert.equal(content(markdownToAdf('See !adf:link[a]{id=01a032c3-7a90-70c9-88f6-c60f710eda07}.\n')), named) assert.equal(content(markdownToAdf('See !adf:link[a]{id=01a032c3-7a90-70c9-88f6-c60f710eda07}.\n')), named)
assert.equal(content(markdownToAdf('!adf:underline[!adf:link[a]{title=t}]\n')), named)
assert.deepEqual(path(markdownToAdf('Part.\n\nSee !adf:link[a]{title=t}.\n')), ['content', 1])
}) })
test('names the directive mark left without the content it wraps', () => { test('names the directive mark left without the content it wraps', () => {
+1 -2
View File
@@ -8,8 +8,7 @@ milestone. A done item shrinks to its title here; its full text moves to `todo-h
Start a session with: `Read AGENTS.md and todo.md, then do what todo.md's "Next session" says.` Start a session with: `Read AGENTS.md and todo.md, then do what todo.md's "Next session" says.`
1. `git fetch origin` first and read this file at `origin/main`, then branch off it, not the 1. `git fetch origin` first and read this file at `origin/main`, then branch off it, not the
worktree left behind: a checkout behind the remote reads a merged item as unchecked, which sent worktree left behind: a checkout behind the remote reads a merged item as unchecked.
this session at 14 after it had shipped.
2. The first unchecked item in shipping order, per AGENTS.md §15 — or, where that item has no 2. The first unchecked item in shipping order, per AGENTS.md §15 — or, where that item has no
release, the planning chunk §15 describes. release, the planning chunk §15 describes.
3. In flight: nothing. 3. In flight: nothing.