diff --git a/CHANGELOG.md b/CHANGELOG.md index ae68cca2..8a43d4d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,15 +15,6 @@ All notable changes to `carve-grammars` are documented here. `carveSpan` mark carrying the language for `{:fr}`, `{:de-DE}`, `{:}`, a language beside another attribute, and the long `lang="fr"` spelling. -- **A quote's `^ …` attribution stays editable and survives an edit.** The - engine now carries it as an `attribution` field on `block_quote` rather than - a `figure`/`figcaption` pair, and the loader read that field nowhere - so the - line survived only in the whole-document source envelope, which the first - edit invalidates. Editing a quote silently dropped its attribution. It now - projects onto the existing `carveCaption` node, appended inside the quote - where the engine renders it, and the serializer writes it back as a `^ …` - line after the quote. - ## 0.1.4 - 2026-08-11 ### Added diff --git a/package-lock.json b/package-lock.json index e17393b0..a2d81bda 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.4", "license": "MIT", "dependencies": { - "@markup-carve/carve": "github:markup-carve/carve-js#8d38a03cc8664e761f81baa02a1bf54e7dde96a4" + "@markup-carve/carve": "github:markup-carve/carve-js#2bfa5cfe9e950212b5cb286251c533a147e01df2" }, "devDependencies": { "@shikijs/themes": "^3.13.0", @@ -83,8 +83,8 @@ }, "node_modules/@markup-carve/carve": { "version": "0.1.3", - "resolved": "git+ssh://git@github.com/markup-carve/carve-js.git#8d38a03cc8664e761f81baa02a1bf54e7dde96a4", - "integrity": "sha512-bgWqsw+GotXoqZDAzuSDT3Rb4EoYlbSPlYhlb1pmEkGE531NnWnrZ4ndS/kkW/5bCd+ypS0hK6HOuFghQNa3Rw==", + "resolved": "git+ssh://git@github.com/markup-carve/carve-js.git#2bfa5cfe9e950212b5cb286251c533a147e01df2", + "integrity": "sha512-zlRgQwahclqdPbS54JAHEN3fXrtJbyHek76le7PbCwVkhIa2UtNZWkpt3ikZMZu7EkPN8qu9Bj0HbjYlIb/Xpw==", "license": "MIT", "dependencies": { "parse5": "^7.3.0" diff --git a/package.json b/package.json index 0bf1c356..7dc038bf 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "module", "main": "tiptap/index.js", "scripts": { - "test": "npm run test:types && node tests/carve-editor-test.js && node tests/block-battery-test.js && node tests/coverage-test.js && node tests/schema-map-test.js && node tests/snapshot-test.js && node tests/roundtrip-test.js && node tests/mounted-roundtrip-test.js && node tests/serializer-test.js && node tests/tabs-roundtrip-test.js && node tests/parse-test.js && node tests/language-attribute-test.js && node tests/blockquote-attribution-test.js && node tests/grammar-test.js && node tests/shiki-test.js && node tests/engine-sweep-test.js && node tests/abbreviation-term-test.js && node tests/unclosed-delimiter-test.js && node tests/textmate-sweep-test.js && node tests/kroki-test.js && node tests/client-diagram-test.js", + "test": "npm run test:types && node tests/carve-editor-test.js && node tests/block-battery-test.js && node tests/coverage-test.js && node tests/schema-map-test.js && node tests/snapshot-test.js && node tests/roundtrip-test.js && node tests/mounted-roundtrip-test.js && node tests/serializer-test.js && node tests/tabs-roundtrip-test.js && node tests/parse-test.js && node tests/language-attribute-test.js && node tests/blockquote-caption-test.js && node tests/grammar-test.js && node tests/shiki-test.js && node tests/engine-sweep-test.js && node tests/abbreviation-term-test.js && node tests/unclosed-delimiter-test.js && node tests/textmate-sweep-test.js && node tests/kroki-test.js && node tests/client-diagram-test.js", "test:types": "tsc -p tsconfig.types.json", "test:coverage": "node tests/coverage-test.js", "test:snapshot": "node tests/snapshot-test.js", @@ -78,7 +78,7 @@ "./tiptap/schema-map.json": "./tiptap/schema-map.json" }, "dependencies": { - "@markup-carve/carve": "github:markup-carve/carve-js#8d38a03cc8664e761f81baa02a1bf54e7dde96a4" + "@markup-carve/carve": "github:markup-carve/carve-js#2bfa5cfe9e950212b5cb286251c533a147e01df2" }, "peerDependencies": { "@shikijs/themes": "^2 || ^3", diff --git a/tests/blockquote-attribution-test.js b/tests/blockquote-attribution-test.js deleted file mode 100644 index 9e4212af..00000000 --- a/tests/blockquote-attribution-test.js +++ /dev/null @@ -1,313 +0,0 @@ -/** - * A quote's `^ …` attribution has to stay EDITABLE, and survive an edit. - * - * markup-carve/carve-js#1033 made a caption on a quote the quote's own - * `attribution` field on `block_quote`, rather than a `figure`/`figcaption` - * pair wrapped around it. Before that, `^ Steve Jobs` reached the editor as a - * real `carveFigure`/`carveCaption` pair; after it, the loader read the field - * nowhere and the line survived only inside the whole-document `carveSource` - * envelope. - * - * That envelope is keyed to a fingerprint of the untouched document, so the - * FIRST EDIT invalidates it and the serializer falls back to the editable - * projection - which did not carry the attribution. Editing a quote silently - * dropped its attribution. A load-only assertion cannot see that: the envelope - * still holds the whole source at load time, so a check that only inspects the - * loaded string passes while the user-visible bug is intact. Every row below - * therefore mounts a real editor, makes an UNRELATED edit, and reads what the - * pane would write back. - * - * The projection is `carveCaption`, the caption node this schema already has, - * appended inside the quote - which is where the engine renders it, as a - * `