Skip to content

Commit eb72633

Browse files
cscheidclaude
andcommitted
pampa: migrate FileId scheme from sequential to hash-based (bd-ky14a)
Pampa's ASTContext now derives FileIds via `quarto_yaml::file_id_for_filename(name)` (hashing the filename string) instead of using sequential `FileId(0)` for the document's primary file. This makes pampa's `SourceInfo`s globally interchangeable with `SourceInfo`s produced by quarto_yaml (and any other parser using the same recipe), eliminating the out-of-band-binding requirement that bd-1pwy8 had to work around with `(FileId, &Path)` candidate pairs. ## What changed ### Core: ASTContext gains a primary_file_id field `crates/pampa/src/pandoc/ast_context.rs` - New private field `primary_file_id: FileId`, cached at construction so `current_file_id()` doesn't re-hash on every call. - `new()` and `anonymous()` now delegate to `with_filename(name)` with the `<unknown>` / `<anonymous>` placeholder names. - `with_filename` computes the FileId via `quarto_yaml::file_id_for_filename` and registers the SourceContext entry via `add_file_with_id`. - New `from_parts(filenames, source_context, primary_file_id)` constructor for deserialization paths (the JSON reader uses this). ### Production sites updated to use hash-based FileIds - `crates/pampa/src/readers/qmd.rs` — registers the input under `current_file_id()` (= hash) instead of the sequential 0. - `crates/pampa/src/readers/json.rs` — when deserializing ASTContext, computes each file's hash FileId and uses the new `SourceContext::add_file_with_id_and_info` helper to preserve the line-break index. - `crates/quarto-core/src/stage/stages/parse_document.rs` — the SourceContext built in the parse stage now uses `add_file_with_id(file_id_for_filename(source_name), …)` so it matches what pampa puts on the AST's SourceInfos. - `crates/quarto-core/src/pipeline.rs` (q2-preview path) — same treatment. - `crates/perf-harness/src/bin/parse_qmd_to_ast.rs` — replaces struct-literal ASTContext construction with `from_parts`. - `crates/wasm-quarto-hub-client/src/lib.rs` — same. - `crates/quarto-lsp-core/src/document.rs` (`Document::create_source_context*`) — registers the document under the hash FileId so analyze_document's SourceInfos resolve. - `crates/quarto-core/src/transforms/attribution_render.rs` — the v1 "skip non-primary file" gate previously compared `file_id != 0`; now it compares against the AST-derived primary file_id. ### Simplifications enabled by the new scheme - `crates/quarto-core/src/stage/stages/include_expansion.rs` — dropped the `quarto_ast_reconcile::remap_file_ids(FileId(0) → new_sequential_id)` workaround and the parallel-SourceContext lockstep with the `debug_assert_eq!` desync check. Included sub-documents now land at `FileId(hash(filename))` natively; registration in the parent's contexts is idempotent on FileId. - `crates/quarto-core/src/stage/stages/engine_execution.rs` — same: dropped the `remap_file_ids(id.0 + 1)` shift; the intermediate `.rmarkdown` already has its hash FileId. ### Source-map helper - `crates/quarto-source-map/src/context.rs` — new `add_file_with_id_and_info` method, combining the existing `add_file_with_id` (specific FileId, can panic if duplicate) with `add_file_with_info` (pre-computed FileInformation). Needed by the JSON deserializer's roundtrip path. ## Contract tests (the TDD anchor) Five new tests across the workspace. Each one fails on `main` with the expected `FileId(0)` vs `FileId(hash)` mismatch and turns green after the migration: 1. `pampa::pandoc::ast_context::tests::bd_ky14a_with_filename_uses_quarto_yaml_file_id` 2. `pampa::pandoc::ast_context::tests::bd_ky14a_source_context_indexed_by_hash_file_id` 3. `quarto_core::bd_ky14a_file_id_contract::bd_ky14a_pampa_qmd_read_uses_quarto_yaml_file_id` 4. `quarto_core::bd_ky14a_file_id_contract::bd_ky14a_sub_document_file_id_is_hash_based` 5. `quarto_core::bd_ky14a_file_id_contract::bd_ky14a_fresh_source_context_renders_pampa_source_info` ## Pre-existing tests touched - `pampa::tests::json_location_test::test_json_location_enabled` — assertion `location["f"] == 0` updated to `file_id_for_filename`. - `pampa::tests::qmd_writer_source_info::round_trip_code_block_offset_accuracy` — test fixture's `SourceContext` now uses `add_file_with_id` with the hash FileId, matching the SourceInfos that come out of the parser. - `quarto-core::stage::stages::engine_execution::tests::test_engine_execution_remaps_new_blocks_to_intermediate` — expected FileIds updated to the hashes of the two filenames involved. - `quarto-core::stage::stages::include_expansion::tests::included_blocks_have_correct_file_id` — same. - `pampa::pandoc::ast_context::tests::test_primary_file_id` / `test_current_file_id` — assert against the hash, not literal `FileId(0)`. ## Snapshot test changes **62 snapshot files updated** in `crates/pampa/snapshots/json/`. The diffs are exclusively `"d": 0` → `"d": <hash>` substitutions in the `sourceInfoPool` entries for `Original` SourceInfos (entries with `"t":0`). Pool *index* values (small integers in non-`d` positions) are unchanged. No semantic changes — just the FileIds that pampa now emits. Affected snapshot files (sample, see git diff for the full set): - `001.snap`, `002.snap`, `003.snap` - `anchor-shorthand-{01..06}-*.snap` (6 files) - `header-autoid-*.snap` (3 files) - `horizontal-rules*.snap` (2 files) - `html-comment-{01..48}-*.snap` (48 files) - `math-with-attr.snap`, `table-alignment.snap`, `table-caption-attr.snap`, `yaml-tags.snap` ## Verification - `cargo nextest run --workspace` → 9418 passed, 0 failed. (Net new: 5 contract tests; otherwise the count matches the bd-1pwy8 baseline.) - `cargo xtask verify` (full pass — Rust + WASM + hub-client + tests) → green. ## Workflow Per the plan, this PR should be **reviewed by the parallel source-location workstream** before merging. Push as a feature branch; do **not** merge to main locally. Plan: claude-notes/plans/2026-05-22-pampa-hash-fileids.md Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 65f13fa commit eb72633

81 files changed

Lines changed: 693 additions & 269 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/pampa/snapshots/json/001.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
source: crates/pampa/tests/test.rs
33
expression: output
44
---
5-
{"blocks":[{"c":[{"c":"This","s":1,"t":"Str"},{"s":2,"t":"Space"},{"c":"is","s":3,"t":"Str"},{"s":4,"t":"Space"},{"c":"a","s":5,"t":"Str"},{"s":6,"t":"Space"},{"c":[{"c":"bold","s":8,"t":"Str"}],"s":7,"t":"Strong"},{"s":9,"t":"Space"},{"c":"test.","s":10,"t":"Str"}],"s":0,"t":"Para"}],"meta":{},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[24],"name":"tests/snapshots/json/001.qmd","total_length":25}],"sourceInfoPool":[{"d":0,"r":[0,25],"t":0},{"d":0,"r":[0,4],"t":0},{"d":0,"r":[4,5],"t":0},{"d":0,"r":[5,7],"t":0},{"d":0,"r":[7,8],"t":0},{"d":0,"r":[8,9],"t":0},{"d":0,"r":[9,10],"t":0},{"d":0,"r":[10,18],"t":0},{"d":0,"r":[12,16],"t":0},{"d":0,"r":[18,19],"t":0},{"d":0,"r":[19,24],"t":0}]}}
5+
{"blocks":[{"c":[{"c":"This","s":1,"t":"Str"},{"s":2,"t":"Space"},{"c":"is","s":3,"t":"Str"},{"s":4,"t":"Space"},{"c":"a","s":5,"t":"Str"},{"s":6,"t":"Space"},{"c":[{"c":"bold","s":8,"t":"Str"}],"s":7,"t":"Strong"},{"s":9,"t":"Space"},{"c":"test.","s":10,"t":"Str"}],"s":0,"t":"Para"}],"meta":{},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[24],"name":"tests/snapshots/json/001.qmd","total_length":25}],"sourceInfoPool":[{"d":15546886124050637279,"r":[0,25],"t":0},{"d":15546886124050637279,"r":[0,4],"t":0},{"d":15546886124050637279,"r":[4,5],"t":0},{"d":15546886124050637279,"r":[5,7],"t":0},{"d":15546886124050637279,"r":[7,8],"t":0},{"d":15546886124050637279,"r":[8,9],"t":0},{"d":15546886124050637279,"r":[9,10],"t":0},{"d":15546886124050637279,"r":[10,18],"t":0},{"d":15546886124050637279,"r":[12,16],"t":0},{"d":15546886124050637279,"r":[18,19],"t":0},{"d":15546886124050637279,"r":[19,24],"t":0}]}}

crates/pampa/snapshots/json/002.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
source: crates/pampa/tests/test.rs
33
expression: output
44
---
5-
{"blocks":[{"attrS":{"classes":[1],"id":null,"kvs":[]},"c":[["",["hello"],[]],[]],"s":0,"t":"Div"}],"meta":{"nested":{"c":[{"c":"meta","s":6,"t":"Str"}],"s":4,"t":"MetaInlines"},"title":{"c":[{"c":"metadata1","s":11,"t":"Str"}],"s":9,"t":"MetaInlines"}},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[3,20,24,25,35,36,40,53,57,58,62],"name":"tests/snapshots/json/002.qmd","total_length":63}],"metaTopLevelKeySources":{"nested":13,"title":15},"sourceInfoPool":[{"d":0,"r":[26,63],"t":0},{"d":0,"r":[30,35],"t":0},{"d":0,"r":[37,58],"t":0},{"d":2,"r":[4,16],"t":1},{"d":3,"r":[8,12],"t":1},{"d":3,"r":[8,12],"t":1},{"d":5,"r":[0,4],"t":1},{"d":0,"r":[0,25],"t":0},{"d":7,"r":[4,20],"t":1},{"d":8,"r":[7,16],"t":1},{"d":8,"r":[7,16],"t":1},{"d":10,"r":[0,9],"t":1},{"d":2,"r":[4,16],"t":1},{"d":12,"r":[0,6],"t":1},{"d":7,"r":[4,20],"t":1},{"d":14,"r":[0,5],"t":1}]}}
5+
{"blocks":[{"attrS":{"classes":[1],"id":null,"kvs":[]},"c":[["",["hello"],[]],[]],"s":0,"t":"Div"}],"meta":{"nested":{"c":[{"c":"meta","s":6,"t":"Str"}],"s":4,"t":"MetaInlines"},"title":{"c":[{"c":"metadata1","s":11,"t":"Str"}],"s":9,"t":"MetaInlines"}},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[3,20,24,25,35,36,40,53,57,58,62],"name":"tests/snapshots/json/002.qmd","total_length":63}],"metaTopLevelKeySources":{"nested":13,"title":15},"sourceInfoPool":[{"d":6374066169044407051,"r":[26,63],"t":0},{"d":6374066169044407051,"r":[30,35],"t":0},{"d":0,"r":[37,58],"t":0},{"d":2,"r":[4,16],"t":1},{"d":3,"r":[8,12],"t":1},{"d":3,"r":[8,12],"t":1},{"d":5,"r":[0,4],"t":1},{"d":6374066169044407051,"r":[0,25],"t":0},{"d":7,"r":[4,20],"t":1},{"d":8,"r":[7,16],"t":1},{"d":8,"r":[7,16],"t":1},{"d":10,"r":[0,9],"t":1},{"d":2,"r":[4,16],"t":1},{"d":12,"r":[0,6],"t":1},{"d":7,"r":[4,20],"t":1},{"d":14,"r":[0,5],"t":1}]}}

crates/pampa/snapshots/json/003.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
source: crates/pampa/tests/test.rs
33
expression: output
44
---
5-
{"blocks":[{"attrS":{"classes":[1],"id":null,"kvs":[]},"c":[["",["hello"],[]],[{"c":{"c":[{"key":"_scope","key_source":6,"value":{"c":[{"c":"lexical","s":10,"t":"Str"}],"s":8,"t":"MetaInlines"}},{"key":"nested","key_source":12,"value":{"c":[{"c":"meta","s":16,"t":"Str"}],"s":14,"t":"MetaInlines"}}],"s":4,"t":"MetaMap"},"s":2,"t":"BlockMetadata"}]],"s":0,"t":"Div"}],"meta":{"title":{"c":[{"c":"metadata1","s":21,"t":"Str"}],"s":19,"t":"MetaInlines"}},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[3,20,24,25,35,36,40,56,69,73,74,78],"name":"tests/snapshots/json/003.qmd","total_length":79}],"metaTopLevelKeySources":{"title":23},"sourceInfoPool":[{"d":0,"r":[26,79],"t":0},{"d":0,"r":[30,35],"t":0},{"d":0,"r":[37,74],"t":0},{"d":0,"r":[37,74],"t":0},{"d":3,"r":[4,32],"t":1},{"d":3,"r":[4,32],"t":1},{"d":5,"r":[0,6],"t":1},{"d":3,"r":[4,32],"t":1},{"d":7,"r":[8,15],"t":1},{"d":7,"r":[8,15],"t":1},{"d":9,"r":[0,7],"t":1},{"d":3,"r":[4,32],"t":1},{"d":11,"r":[16,22],"t":1},{"d":3,"r":[4,32],"t":1},{"d":13,"r":[24,28],"t":1},{"d":13,"r":[24,28],"t":1},{"d":15,"r":[0,4],"t":1},{"d":0,"r":[0,25],"t":0},{"d":17,"r":[4,20],"t":1},{"d":18,"r":[7,16],"t":1},{"d":18,"r":[7,16],"t":1},{"d":20,"r":[0,9],"t":1},{"d":17,"r":[4,20],"t":1},{"d":22,"r":[0,5],"t":1}]}}
5+
{"blocks":[{"attrS":{"classes":[1],"id":null,"kvs":[]},"c":[["",["hello"],[]],[{"c":{"c":[{"key":"_scope","key_source":6,"value":{"c":[{"c":"lexical","s":10,"t":"Str"}],"s":8,"t":"MetaInlines"}},{"key":"nested","key_source":12,"value":{"c":[{"c":"meta","s":16,"t":"Str"}],"s":14,"t":"MetaInlines"}}],"s":4,"t":"MetaMap"},"s":2,"t":"BlockMetadata"}]],"s":0,"t":"Div"}],"meta":{"title":{"c":[{"c":"metadata1","s":21,"t":"Str"}],"s":19,"t":"MetaInlines"}},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[3,20,24,25,35,36,40,56,69,73,74,78],"name":"tests/snapshots/json/003.qmd","total_length":79}],"metaTopLevelKeySources":{"title":23},"sourceInfoPool":[{"d":17531091479715020154,"r":[26,79],"t":0},{"d":17531091479715020154,"r":[30,35],"t":0},{"d":0,"r":[37,74],"t":0},{"d":0,"r":[37,74],"t":0},{"d":3,"r":[4,32],"t":1},{"d":3,"r":[4,32],"t":1},{"d":5,"r":[0,6],"t":1},{"d":3,"r":[4,32],"t":1},{"d":7,"r":[8,15],"t":1},{"d":7,"r":[8,15],"t":1},{"d":9,"r":[0,7],"t":1},{"d":3,"r":[4,32],"t":1},{"d":11,"r":[16,22],"t":1},{"d":3,"r":[4,32],"t":1},{"d":13,"r":[24,28],"t":1},{"d":13,"r":[24,28],"t":1},{"d":15,"r":[0,4],"t":1},{"d":17531091479715020154,"r":[0,25],"t":0},{"d":17,"r":[4,20],"t":1},{"d":18,"r":[7,16],"t":1},{"d":18,"r":[7,16],"t":1},{"d":20,"r":[0,9],"t":1},{"d":17,"r":[4,20],"t":1},{"d":22,"r":[0,5],"t":1}]}}

crates/pampa/snapshots/json/anchor-shorthand-01-simple.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
source: crates/pampa/tests/test.rs
33
expression: output
44
---
5-
{"blocks":[{"c":[{"c":"An","s":1,"t":"Str"},{"s":2,"t":"Space"},{"c":"anchor:","s":5,"t":"Str"},{"s":6,"t":"Space"},{"attrS":{"classes":[],"id":null,"kvs":[]},"c":[["",["anchor"],[]],[{"c":"foo","s":8,"t":"Str"}],["#foo",""]],"s":7,"t":"Link","targetS":[null,null]}],"s":0,"t":"Para"}],"meta":{},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[17],"name":"tests/snapshots/json/anchor-shorthand-01-simple.qmd","total_length":18}],"sourceInfoPool":[{"d":0,"r":[0,18],"t":0},{"d":0,"r":[0,2],"t":0},{"d":0,"r":[2,3],"t":0},{"d":0,"r":[3,9],"t":0},{"d":0,"r":[9,10],"t":0},{"d":[[3,0,6],[4,6,1]],"r":[0,7],"t":2},{"d":0,"r":[10,11],"t":0},{"d":0,"r":[11,17],"t":0},{"d":0,"r":[11,17],"t":0}]}}
5+
{"blocks":[{"c":[{"c":"An","s":1,"t":"Str"},{"s":2,"t":"Space"},{"c":"anchor:","s":5,"t":"Str"},{"s":6,"t":"Space"},{"attrS":{"classes":[],"id":null,"kvs":[]},"c":[["",["anchor"],[]],[{"c":"foo","s":8,"t":"Str"}],["#foo",""]],"s":7,"t":"Link","targetS":[null,null]}],"s":0,"t":"Para"}],"meta":{},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[17],"name":"tests/snapshots/json/anchor-shorthand-01-simple.qmd","total_length":18}],"sourceInfoPool":[{"d":8055864538776543167,"r":[0,18],"t":0},{"d":8055864538776543167,"r":[0,2],"t":0},{"d":8055864538776543167,"r":[2,3],"t":0},{"d":8055864538776543167,"r":[3,9],"t":0},{"d":8055864538776543167,"r":[9,10],"t":0},{"d":[[3,0,6],[4,6,1]],"r":[0,7],"t":2},{"d":8055864538776543167,"r":[10,11],"t":0},{"d":8055864538776543167,"r":[11,17],"t":0},{"d":8055864538776543167,"r":[11,17],"t":0}]}}

crates/pampa/snapshots/json/anchor-shorthand-02-in-paragraph.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
source: crates/pampa/tests/test.rs
33
expression: output
44
---
5-
{"blocks":[{"c":[{"c":"Before","s":1,"t":"Str"},{"s":2,"t":"Space"},{"attrS":{"classes":[],"id":null,"kvs":[]},"c":[["",["anchor"],[]],[{"c":"foo","s":4,"t":"Str"}],["#foo",""]],"s":3,"t":"Link","targetS":[null,null]},{"s":5,"t":"Space"},{"c":"after.","s":6,"t":"Str"}],"s":0,"t":"Para"}],"meta":{},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[20],"name":"tests/snapshots/json/anchor-shorthand-02-in-paragraph.qmd","total_length":21}],"sourceInfoPool":[{"d":0,"r":[0,21],"t":0},{"d":0,"r":[0,6],"t":0},{"d":0,"r":[6,7],"t":0},{"d":0,"r":[7,13],"t":0},{"d":0,"r":[7,13],"t":0},{"d":0,"r":[13,14],"t":0},{"d":0,"r":[14,20],"t":0}]}}
5+
{"blocks":[{"c":[{"c":"Before","s":1,"t":"Str"},{"s":2,"t":"Space"},{"attrS":{"classes":[],"id":null,"kvs":[]},"c":[["",["anchor"],[]],[{"c":"foo","s":4,"t":"Str"}],["#foo",""]],"s":3,"t":"Link","targetS":[null,null]},{"s":5,"t":"Space"},{"c":"after.","s":6,"t":"Str"}],"s":0,"t":"Para"}],"meta":{},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[20],"name":"tests/snapshots/json/anchor-shorthand-02-in-paragraph.qmd","total_length":21}],"sourceInfoPool":[{"d":10207620689214944321,"r":[0,21],"t":0},{"d":10207620689214944321,"r":[0,6],"t":0},{"d":10207620689214944321,"r":[6,7],"t":0},{"d":10207620689214944321,"r":[7,13],"t":0},{"d":10207620689214944321,"r":[7,13],"t":0},{"d":10207620689214944321,"r":[13,14],"t":0},{"d":10207620689214944321,"r":[14,20],"t":0}]}}

crates/pampa/snapshots/json/anchor-shorthand-03-hyphenated.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
source: crates/pampa/tests/test.rs
33
expression: output
44
---
5-
{"blocks":[{"c":[{"c":"Link","s":1,"t":"Str"},{"s":2,"t":"Space"},{"c":"to","s":3,"t":"Str"},{"s":4,"t":"Space"},{"attrS":{"classes":[],"id":null,"kvs":[]},"c":[["",["anchor"],[]],[{"c":"foo-bar","s":6,"t":"Str"}],["#foo-bar",""]],"s":5,"t":"Link","targetS":[null,null]},{"s":7,"t":"Space"},{"c":"here.","s":8,"t":"Str"}],"s":0,"t":"Para"}],"meta":{},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[24],"name":"tests/snapshots/json/anchor-shorthand-03-hyphenated.qmd","total_length":25}],"sourceInfoPool":[{"d":0,"r":[0,25],"t":0},{"d":0,"r":[0,4],"t":0},{"d":0,"r":[4,5],"t":0},{"d":0,"r":[5,7],"t":0},{"d":0,"r":[7,8],"t":0},{"d":0,"r":[8,18],"t":0},{"d":0,"r":[8,18],"t":0},{"d":0,"r":[18,19],"t":0},{"d":0,"r":[19,24],"t":0}]}}
5+
{"blocks":[{"c":[{"c":"Link","s":1,"t":"Str"},{"s":2,"t":"Space"},{"c":"to","s":3,"t":"Str"},{"s":4,"t":"Space"},{"attrS":{"classes":[],"id":null,"kvs":[]},"c":[["",["anchor"],[]],[{"c":"foo-bar","s":6,"t":"Str"}],["#foo-bar",""]],"s":5,"t":"Link","targetS":[null,null]},{"s":7,"t":"Space"},{"c":"here.","s":8,"t":"Str"}],"s":0,"t":"Para"}],"meta":{},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[24],"name":"tests/snapshots/json/anchor-shorthand-03-hyphenated.qmd","total_length":25}],"sourceInfoPool":[{"d":4161383644116479051,"r":[0,25],"t":0},{"d":4161383644116479051,"r":[0,4],"t":0},{"d":4161383644116479051,"r":[4,5],"t":0},{"d":4161383644116479051,"r":[5,7],"t":0},{"d":4161383644116479051,"r":[7,8],"t":0},{"d":4161383644116479051,"r":[8,18],"t":0},{"d":4161383644116479051,"r":[8,18],"t":0},{"d":4161383644116479051,"r":[18,19],"t":0},{"d":4161383644116479051,"r":[19,24],"t":0}]}}

crates/pampa/snapshots/json/anchor-shorthand-04-underscored.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
source: crates/pampa/tests/test.rs
33
expression: output
44
---
5-
{"blocks":[{"c":[{"c":"Link","s":1,"t":"Str"},{"s":2,"t":"Space"},{"c":"to","s":3,"t":"Str"},{"s":4,"t":"Space"},{"attrS":{"classes":[],"id":null,"kvs":[]},"c":[["",["anchor"],[]],[{"c":"foo_bar","s":6,"t":"Str"}],["#foo_bar",""]],"s":5,"t":"Link","targetS":[null,null]},{"s":7,"t":"Space"},{"c":"here.","s":8,"t":"Str"}],"s":0,"t":"Para"}],"meta":{},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[24],"name":"tests/snapshots/json/anchor-shorthand-04-underscored.qmd","total_length":25}],"sourceInfoPool":[{"d":0,"r":[0,25],"t":0},{"d":0,"r":[0,4],"t":0},{"d":0,"r":[4,5],"t":0},{"d":0,"r":[5,7],"t":0},{"d":0,"r":[7,8],"t":0},{"d":0,"r":[8,18],"t":0},{"d":0,"r":[8,18],"t":0},{"d":0,"r":[18,19],"t":0},{"d":0,"r":[19,24],"t":0}]}}
5+
{"blocks":[{"c":[{"c":"Link","s":1,"t":"Str"},{"s":2,"t":"Space"},{"c":"to","s":3,"t":"Str"},{"s":4,"t":"Space"},{"attrS":{"classes":[],"id":null,"kvs":[]},"c":[["",["anchor"],[]],[{"c":"foo_bar","s":6,"t":"Str"}],["#foo_bar",""]],"s":5,"t":"Link","targetS":[null,null]},{"s":7,"t":"Space"},{"c":"here.","s":8,"t":"Str"}],"s":0,"t":"Para"}],"meta":{},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[24],"name":"tests/snapshots/json/anchor-shorthand-04-underscored.qmd","total_length":25}],"sourceInfoPool":[{"d":16524131619636936951,"r":[0,25],"t":0},{"d":16524131619636936951,"r":[0,4],"t":0},{"d":16524131619636936951,"r":[4,5],"t":0},{"d":16524131619636936951,"r":[5,7],"t":0},{"d":16524131619636936951,"r":[7,8],"t":0},{"d":16524131619636936951,"r":[8,18],"t":0},{"d":16524131619636936951,"r":[8,18],"t":0},{"d":16524131619636936951,"r":[18,19],"t":0},{"d":16524131619636936951,"r":[19,24],"t":0}]}}

crates/pampa/snapshots/json/anchor-shorthand-05-numeric.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
source: crates/pampa/tests/test.rs
33
expression: output
44
---
5-
{"blocks":[{"c":[{"c":"Link","s":1,"t":"Str"},{"s":2,"t":"Space"},{"c":"to","s":3,"t":"Str"},{"s":4,"t":"Space"},{"attrS":{"classes":[],"id":null,"kvs":[]},"c":[["",["anchor"],[]],[{"c":"123","s":6,"t":"Str"}],["#123",""]],"s":5,"t":"Link","targetS":[null,null]},{"s":7,"t":"Space"},{"c":"here.","s":8,"t":"Str"}],"s":0,"t":"Para"}],"meta":{},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[20],"name":"tests/snapshots/json/anchor-shorthand-05-numeric.qmd","total_length":21}],"sourceInfoPool":[{"d":0,"r":[0,21],"t":0},{"d":0,"r":[0,4],"t":0},{"d":0,"r":[4,5],"t":0},{"d":0,"r":[5,7],"t":0},{"d":0,"r":[7,8],"t":0},{"d":0,"r":[8,14],"t":0},{"d":0,"r":[8,14],"t":0},{"d":0,"r":[14,15],"t":0},{"d":0,"r":[15,20],"t":0}]}}
5+
{"blocks":[{"c":[{"c":"Link","s":1,"t":"Str"},{"s":2,"t":"Space"},{"c":"to","s":3,"t":"Str"},{"s":4,"t":"Space"},{"attrS":{"classes":[],"id":null,"kvs":[]},"c":[["",["anchor"],[]],[{"c":"123","s":6,"t":"Str"}],["#123",""]],"s":5,"t":"Link","targetS":[null,null]},{"s":7,"t":"Space"},{"c":"here.","s":8,"t":"Str"}],"s":0,"t":"Para"}],"meta":{},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[20],"name":"tests/snapshots/json/anchor-shorthand-05-numeric.qmd","total_length":21}],"sourceInfoPool":[{"d":892969530807417,"r":[0,21],"t":0},{"d":892969530807417,"r":[0,4],"t":0},{"d":892969530807417,"r":[4,5],"t":0},{"d":892969530807417,"r":[5,7],"t":0},{"d":892969530807417,"r":[7,8],"t":0},{"d":892969530807417,"r":[8,14],"t":0},{"d":892969530807417,"r":[8,14],"t":0},{"d":892969530807417,"r":[14,15],"t":0},{"d":892969530807417,"r":[15,20],"t":0}]}}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
source: crates/pampa/tests/test.rs
3-
assertion_line: 362
43
expression: output
54
---
6-
{"blocks":[{"c":[{"c":"This","s":1,"t":"Str"},{"s":2,"t":"Space"},{"c":["html","<#>"],"s":3,"t":"RawInline"},{"s":4,"t":"Space"},{"c":"stays","s":5,"t":"Str"},{"s":6,"t":"Space"},{"c":"raw.","s":7,"t":"Str"}],"s":0,"t":"Para"}],"meta":{},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[19],"name":"tests/snapshots/json/anchor-shorthand-06-empty.qmd","total_length":20}],"sourceInfoPool":[{"d":0,"r":[0,20],"t":0},{"d":0,"r":[0,4],"t":0},{"d":0,"r":[4,5],"t":0},{"d":0,"r":[5,8],"t":0},{"d":0,"r":[8,9],"t":0},{"d":0,"r":[9,14],"t":0},{"d":0,"r":[14,15],"t":0},{"d":0,"r":[15,19],"t":0}]}}
5+
{"blocks":[{"c":[{"c":"This","s":1,"t":"Str"},{"s":2,"t":"Space"},{"c":["html","<#>"],"s":3,"t":"RawInline"},{"s":4,"t":"Space"},{"c":"stays","s":5,"t":"Str"},{"s":6,"t":"Space"},{"c":"raw.","s":7,"t":"Str"}],"s":0,"t":"Para"}],"meta":{},"pandoc-api-version":[1,23,1],"astContext":{"files":[{"line_breaks":[19],"name":"tests/snapshots/json/anchor-shorthand-06-empty.qmd","total_length":20}],"sourceInfoPool":[{"d":14182282502933005077,"r":[0,20],"t":0},{"d":14182282502933005077,"r":[0,4],"t":0},{"d":14182282502933005077,"r":[4,5],"t":0},{"d":14182282502933005077,"r":[5,8],"t":0},{"d":14182282502933005077,"r":[8,9],"t":0},{"d":14182282502933005077,"r":[9,14],"t":0},{"d":14182282502933005077,"r":[14,15],"t":0},{"d":14182282502933005077,"r":[15,19],"t":0}]}}

0 commit comments

Comments
 (0)