Read the leaf blocks, ahead of any inline parsing #31

Merged
lilleman merged 5 commits from tick-3b into main 2026-08-28 12:11:35 +02:00
3 changed files with 6 additions and 4 deletions
Showing only changes of commit 1e903fe90a - Show all commits
+5 -3
View File
@@ -82,8 +82,9 @@ closed list a consumer may switch exhaustively, the message free text, the path
from the document root. Adding, removing or renaming a code is breaking, so a milestone meeting a
new failure cause reuses a code where one fits; the list is complete at `0.1.0`. A code names the
cause; where one cause recurs across node types, one code covers them all and `path` and `message`
say which. A cause the carry answers gets no code: a mark no spelling writes rides the carry with
its node.
say which. A claim code names the spelling claimed, never the node that spelling would have built:
a malformed `:::table` is a `malformed-directive`. A cause the carry answers gets no code: a mark no
spelling writes rides the carry with its node.
## 9. Release automation
@@ -139,7 +140,8 @@ live Atlassian APIs; property-generated ADF trees; the CommonMark spec suite aga
unrepresentable.
- `src/adf/` holds ADF's own knowledge and imports no format. Each format directory (`markdown/`,
`html/`) parts into `emit/` (ADF→format) and `parse/` (format→ADF), its root holding what both
directions read.
directions read. A construct's reader lives in that root beside the regex the emitter escapes
against, so the two cannot drift; a reader with no emit counterpart goes in `parse/`.
- The attribute vocabulary is ADF's: `adf/` walks it and narrows each value to its kind, and a
format spells the narrowed value. A spelling that re-checks the type is the check's second copy.
- Explicit over implicit; descriptive names; no catch-all files (`utils`, `helpers`, `misc`); a
+1
View File
@@ -35,6 +35,7 @@ test('keeps the link reference definitions a paragraph gives up, the first of a
})
test('leaves the paragraph a line no definition spells', () => {
assert.deepEqual(definitions('[]: /url\n'), [])
assert.deepEqual(definitions('[ ]: /url\n'), [])
assert.deepEqual(definitions('[a]: <un>closed>\n'), [])
assert.deepEqual(definitions('[a]: <unclosed\n'), [])
@@ -37,7 +37,6 @@ function readDefinition(text: string): ReadDefinition | undefined {
return { definition: { destination: destination.value }, label: name, length: plain }
}
// CommonMark's label matching: the whitespace a label holds collapses, and its case folds.
function normalizeLabel(raw: string): string {
return raw
.replace(/^[ \t\n]+|[ \t\n]+$/g, '')