Files
kebab/fixtures/markdown/nested-headings.blocks.snapshot.json
altair823 cfccb3687d p1-3: update kb-parse-md callers + drop BlockView projection in snapshots
Mechanical sweep over `Inline::Text(_)` / `Code(_)` / `Strong(_)` / `Emph(_)`
construction and match sites under the new struct-variant shape introduced
in the previous commit. `Inline::Link { text, href }` is unchanged.

The snapshot test in `tests/blocks_snapshots.rs` previously projected
`ParsedBlock` into a `BlockView`/`PayloadView` shim because the old
`Inline` could not serialize. With the schema fix in place we now
serialize `ParsedBlock` directly through serde — the shim and its
`flatten_inline` helper are removed. Inlines surface as structured
objects (`{"kind":"text","text":"…"}` etc.). Regenerated
`nested-headings.blocks.snapshot.json` to reflect the new shape via
the existing `--ignored` emitter; `code-and-table.blocks.snapshot.json`
has no inlines and is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 15:10:54 +00:00

157 lines
2.7 KiB
JSON

{
"blocks": [
{
"kind": "heading",
"heading_path": [],
"source_span": {
"kind": "line",
"start": 1,
"end": 1
},
"payload": {
"kind": "heading",
"level": 1,
"text": "Top"
}
},
{
"kind": "paragraph",
"heading_path": [
"Top"
],
"source_span": {
"kind": "line",
"start": 3,
"end": 3
},
"payload": {
"kind": "paragraph",
"text": "intro",
"inlines": [
{
"kind": "text",
"text": "intro"
}
]
}
},
{
"kind": "heading",
"heading_path": [
"Top"
],
"source_span": {
"kind": "line",
"start": 5,
"end": 5
},
"payload": {
"kind": "heading",
"level": 2,
"text": "Section A"
}
},
{
"kind": "paragraph",
"heading_path": [
"Top",
"Section A"
],
"source_span": {
"kind": "line",
"start": 7,
"end": 7
},
"payload": {
"kind": "paragraph",
"text": "body of A",
"inlines": [
{
"kind": "text",
"text": "body of A"
}
]
}
},
{
"kind": "heading",
"heading_path": [
"Top",
"Section A"
],
"source_span": {
"kind": "line",
"start": 9,
"end": 9
},
"payload": {
"kind": "heading",
"level": 3,
"text": "Sub A.1"
}
},
{
"kind": "paragraph",
"heading_path": [
"Top",
"Section A",
"Sub A.1"
],
"source_span": {
"kind": "line",
"start": 11,
"end": 11
},
"payload": {
"kind": "paragraph",
"text": "deeper",
"inlines": [
{
"kind": "text",
"text": "deeper"
}
]
}
},
{
"kind": "heading",
"heading_path": [
"Top"
],
"source_span": {
"kind": "line",
"start": 13,
"end": 13
},
"payload": {
"kind": "heading",
"level": 2,
"text": "Section B"
}
},
{
"kind": "paragraph",
"heading_path": [
"Top",
"Section B"
],
"source_span": {
"kind": "line",
"start": 15,
"end": 15
},
"payload": {
"kind": "paragraph",
"text": "body of B",
"inlines": [
{
"kind": "text",
"text": "body of B"
}
]
}
}
],
"warnings": []
}