Corpus by contract kind: pin the fence and escaping rules, hold two questions
CI / gate (push) Successful in 3s

This commit is contained in:
2026-08-24 11:40:11 +02:00
parent 7195cd9f49
commit fc92bf8bf5
37 changed files with 84 additions and 75 deletions
+12 -5
View File
@@ -1,8 +1,15 @@
# The corpus
`<name>.json` is an ADF document; `<name>.md` is the markdown `adfToMarkdown` must emit for it,
byte for byte including the trailing newline, and that `markdownToAdf` must read back to that same
document (AGENTS.md §2). Directories mirror `spec/flavour.md`'s sections.
One directory per contract kind:
The JSON is editor-normal — empty `attrs`, `marks` and `content` as the absent key, adjacent
identical-mark text nodes merged — two-space indent, keys sorted.
- `round-trip/``<name>.json` + `<name>.md`: the markdown `adfToMarkdown` must emit for that
document, byte for byte, and that `markdownToAdf` must read back to it (AGENTS.md §2). Grouped
by node family: `commonmark-subset/`, `block-nodes/`, `inline-nodes/`, `opaque-carry/`,
`combinations/`.
- `normalization/``<name>.md` + `<name>.json`: markdown input, and the document
`markdownToAdf` must build from it. One-way; the markdown is not canonical.
- `errors/``<name>.md` + `<name>.error`: markdown input that must not convert.
- `real-payloads/``<name>.json`: sanitized live ADF, round-tripped ADF→markdown→ADF. No
expected markdown.
JSON is editor-normal (AGENTS.md §2), two-space indent, keys sorted.
-53
View File
@@ -1,53 +0,0 @@
{
"content": [
{
"content": [
{
"content": [
{
"content": [
{
"text": "Bolt M8",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "listItem"
},
{
"content": [
{
"content": [
{
"text": "Nut M8",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "listItem"
},
{
"content": [
{
"content": [
{
"text": "Washer M8",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "listItem"
}
],
"type": "orderedList"
}
],
"type": "doc",
"version": 1
}
-3
View File
@@ -1,3 +0,0 @@
1. Bolt M8
2. Nut M8
3. Washer M8
@@ -0,0 +1,18 @@
{
"content": [
{
"attrs": {
"language": "bash"
},
"content": [
{
"text": "echo \"```\" >> notes.md",
"type": "text"
}
],
"type": "codeBlock"
}
],
"type": "doc",
"version": 1
}
@@ -0,0 +1,3 @@
````bash
echo "```" >> notes.md
````
@@ -1,6 +1,9 @@
{
"content": [
{
"attrs": {
"language": "markdown"
},
"content": [
{
"text": "```\ncode\n```",
@@ -1,4 +1,4 @@
````
````markdown
```
code
```
@@ -0,0 +1,4 @@
{
"type": "doc",
"version": 1
}
@@ -35,6 +35,15 @@
}
],
"type": "paragraph"
},
{
"content": [
{
"text": "*not emphasis*",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "doc",
@@ -5,3 +5,5 @@
2 * 3 * 4 = 24
snake_case_name
\*not emphasis*