From 98c78e4d96923c447c286ec3167be4dbd3df6bb8 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Mon, 25 Jul 2016 13:29:29 -0700 Subject: [PATCH] refactor raw serializer to not be terse by default --- History.md | 7 + docs/reference/serializers/raw.md | 12 +- lib/index.js | 3 + lib/serializers/html.js | 7 +- lib/serializers/raw.js | 710 ++++++++++++++---- package.json | 1 + .../fixtures/custom-block-void/input.yaml | 4 - test/rendering/index.js | 2 +- .../deserialize-terse/block-nested/input.yaml | 11 + .../block-nested/output.yaml | 17 + .../block-with-data/input.yaml | 10 + .../block-with-data/output.yaml | 14 + .../block-with-is-void/input.yaml | 9 + .../block-with-is-void/output.yaml | 7 + .../raw/deserialize-terse/block/input.yaml | 8 + .../block}/output.yaml | 0 .../inline-nested/input.yaml | 14 + .../inline-nested/output.yaml | 21 + .../inline-with-data/input.yaml | 13 + .../inline-with-data/output.yaml | 18 + .../inline-with-is-void/input.yaml | 12 + .../inline-with-is-void/output.yaml | 11 + .../raw/deserialize-terse/inline/input.yaml | 11 + .../raw/deserialize-terse/inline/output.yaml | 17 + .../range-with-mark/input.yaml | 12 + .../range-with-mark/output.yaml | 15 + .../text-without-range/input.yaml | 0 .../text-without-range/output.yaml | 13 + .../raw/deserialize/block-nested/input.yaml | 25 +- .../deserialize/block-with-data/input.yaml | 23 +- .../deserialize/block-with-is-void/input.yaml | 21 +- .../fixtures/raw/deserialize/block/input.yaml | 19 +- .../raw/deserialize/inline-nested/input.yaml | 31 +- .../deserialize/inline-with-data/input.yaml | 29 +- .../inline-with-is-void/input.yaml | 27 +- .../raw/deserialize/inline/input.yaml | 25 +- .../deserialize/range-with-mark/input.yaml | 31 +- .../raw/serialize-terse/block-nested/input.js | 26 + .../serialize-terse/block-nested/output.yaml | 10 + .../serialize-terse/block-with-data/input.js | 22 + .../block-with-data/output.yaml | 9 + .../block-with-is-void/input.js | 22 + .../block-with-is-void/output.yaml | 5 + .../raw/serialize-terse/block/input.js | 21 + .../raw/serialize-terse/block/output.yaml | 7 + .../character-with-mark/input.js | 26 + .../character-with-mark/output.yaml | 10 + .../serialize-terse/inline-nested/input.js | 31 + .../serialize-terse/inline-nested/output.yaml | 13 + .../serialize-terse/inline-with-data/input.js | 27 + .../inline-with-data/output.yaml | 12 + .../inline-with-is-void/input.js | 27 + .../inline-with-is-void/output.yaml | 8 + .../raw/serialize-terse/inline/input.js | 26 + .../raw/serialize-terse/inline/output.yaml | 10 + .../raw/serialize/block-nested/output.yaml | 29 +- .../raw/serialize/block-with-data/output.yaml | 24 +- .../serialize/block-with-is-void/output.yaml | 22 +- .../fixtures/raw/serialize/block/output.yaml | 21 +- .../serialize/character-with-mark/output.yaml | 30 +- .../raw/serialize/inline-nested/output.yaml | 37 +- .../serialize/inline-with-data/output.yaml | 32 +- .../serialize/inline-with-is-void/output.yaml | 30 +- .../fixtures/raw/serialize/inline/output.yaml | 29 +- test/serializers/index.js | 37 +- .../across-blocks/input.yaml | 6 +- .../across-inlines/input.yaml | 6 +- .../first-character/input.yaml | 3 +- .../last-character/input.yaml | 3 +- .../middle-character/input.yaml | 3 +- .../add-mark-at-range/whole-word/input.yaml | 3 +- .../with-mark-object/input.yaml | 3 +- .../with-plain-object/input.yaml | 3 +- .../add-mark/across-blocks/input.yaml | 6 +- .../add-mark/across-inlines/input.yaml | 6 +- .../add-mark/collapsed-selection/input.yaml | 3 +- .../add-mark/first-character/input.yaml | 3 +- .../add-mark/last-character/input.yaml | 3 +- .../add-mark/middle-character/input.yaml | 3 +- .../fixtures/add-mark/whole-word/input.yaml | 3 +- .../add-mark/with-mark-object/input.yaml | 3 +- .../add-mark/with-plain-object/input.yaml | 3 +- .../across-blocks-inlines/input.yaml | 6 +- .../across-blocks-inlines/output.yaml | 6 +- .../first-character/input.yaml | 3 +- .../first-character/output.yaml | 3 +- .../join-blocks-and-trim/input.yaml | 6 +- .../join-blocks-and-trim/output.yaml | 3 +- .../delete-at-range/join-blocks/input.yaml | 6 +- .../delete-at-range/join-blocks/output.yaml | 3 +- .../delete-at-range/last-character/input.yaml | 3 +- .../last-character/output.yaml | 3 +- .../middle-character/input.yaml | 3 +- .../middle-character/output.yaml | 3 +- .../delete-at-range/nested-block/input.yaml | 9 +- .../delete-at-range/nested-block/output.yaml | 3 +- .../delete-at-range/whole-word/input.yaml | 3 +- .../delete-at-range/whole-word/output.yaml | 3 +- .../first-character/input.yaml | 3 +- .../first-character/output.yaml | 3 +- .../join-blocks/input.yaml | 6 +- .../join-blocks/output.yaml | 3 +- .../join-nested-blocks/input.yaml | 6 +- .../join-nested-blocks/output.yaml | 3 +- .../last-character/input.yaml | 3 +- .../last-character/output.yaml | 3 +- .../middle-character/input.yaml | 3 +- .../middle-character/output.yaml | 3 +- .../start-of-document/input.yaml | 3 +- .../start-of-document/output.yaml | 3 +- .../first-character/input.yaml | 3 +- .../first-character/output.yaml | 3 +- .../delete-backward/join-blocks/input.yaml | 6 +- .../delete-backward/join-blocks/output.yaml | 3 +- .../join-nested-blocks/input.yaml | 6 +- .../join-nested-blocks/output.yaml | 3 +- .../delete-backward/last-character/input.yaml | 3 +- .../last-character/output.yaml | 3 +- .../middle-character/input.yaml | 3 +- .../middle-character/output.yaml | 3 +- .../start-of-document/input.yaml | 3 +- .../start-of-document/output.yaml | 3 +- .../end-of-document/input.yaml | 3 +- .../end-of-document/output.yaml | 3 +- .../first-character/input.yaml | 3 +- .../first-character/output.yaml | 3 +- .../join-blocks/input.yaml | 6 +- .../join-blocks/output.yaml | 3 +- .../join-nested-blocks/input.yaml | 6 +- .../join-nested-blocks/output.yaml | 3 +- .../last-character/input.yaml | 3 +- .../last-character/output.yaml | 3 +- .../middle-character/input.yaml | 3 +- .../middle-character/output.yaml | 3 +- .../delete-forward/end-of-document/input.yaml | 3 +- .../end-of-document/output.yaml | 3 +- .../delete-forward/first-character/input.yaml | 3 +- .../first-character/output.yaml | 3 +- .../delete-forward/join-blocks/input.yaml | 6 +- .../delete-forward/join-blocks/output.yaml | 3 +- .../join-nested-blocks/input.yaml | 6 +- .../join-nested-blocks/output.yaml | 3 +- .../delete-forward/last-character/input.yaml | 3 +- .../delete-forward/last-character/output.yaml | 3 +- .../middle-character/input.yaml | 3 +- .../middle-character/output.yaml | 3 +- .../delete/across-blocks-inlines/input.yaml | 6 +- .../delete/across-blocks-inlines/output.yaml | 6 +- .../delete/first-character/input.yaml | 3 +- .../delete/first-character/output.yaml | 3 +- .../delete/join-blocks-and-trim/input.yaml | 6 +- .../delete/join-blocks-and-trim/output.yaml | 3 +- .../fixtures/delete/join-blocks/input.yaml | 6 +- .../fixtures/delete/join-blocks/output.yaml | 3 +- .../fixtures/delete/last-character/input.yaml | 3 +- .../delete/last-character/output.yaml | 3 +- .../delete/middle-character/input.yaml | 3 +- .../delete/middle-character/output.yaml | 3 +- .../fixtures/delete/nested-block/input.yaml | 9 +- .../fixtures/delete/nested-block/output.yaml | 3 +- .../fixtures/delete/whole-word/input.yaml | 3 +- .../fixtures/delete/whole-word/output.yaml | 3 +- .../block-end/input.yaml | 3 +- .../block-end/output.yaml | 6 +- .../block-middle/input.yaml | 3 +- .../block-middle/output.yaml | 9 +- .../block-start/input.yaml | 3 +- .../block-start/output.yaml | 6 +- .../insert-block-at-range/is-empty/input.yaml | 3 +- .../is-empty/output.yaml | 3 +- .../insert-block-at-range/is-void/input.yaml | 3 +- .../insert-block-at-range/is-void/output.yaml | 7 +- .../with-block/input.yaml | 3 +- .../with-block/output.yaml | 6 +- .../with-object/input.yaml | 3 +- .../with-object/output.yaml | 6 +- .../insert-block/block-end/input.yaml | 3 +- .../insert-block/block-end/output.yaml | 6 +- .../insert-block/block-middle/input.yaml | 3 +- .../insert-block/block-middle/output.yaml | 9 +- .../insert-block/block-start/input.yaml | 3 +- .../insert-block/block-start/output.yaml | 6 +- .../fixtures/insert-block/is-empty/input.yaml | 3 +- .../insert-block/is-empty/output.yaml | 3 +- .../fixtures/insert-block/is-void/input.yaml | 3 +- .../fixtures/insert-block/is-void/output.yaml | 7 +- .../insert-block/with-block/input.yaml | 3 +- .../insert-block/with-block/output.yaml | 6 +- .../insert-block/with-object/input.yaml | 3 +- .../insert-block/with-object/output.yaml | 6 +- .../end-block/fragment.yaml | 3 +- .../end-block/index.js | 2 +- .../end-block/input.yaml | 3 +- .../end-block/output.yaml | 3 +- .../end-inline/fragment.yaml | 3 +- .../end-inline/index.js | 2 +- .../end-inline/input.yaml | 3 +- .../end-inline/output.yaml | 6 +- .../index.js | 2 +- .../input.yaml | 3 +- .../output.yaml | 6 +- .../middle-block/fragment.yaml | 3 +- .../middle-block/index.js | 2 +- .../middle-block/input.yaml | 3 +- .../middle-block/output.yaml | 3 +- .../fragment.yaml | 3 +- .../middle-inline-fragment-inline/index.js | 2 +- .../middle-inline-fragment-inline/input.yaml | 3 +- .../middle-inline-fragment-inline/output.yaml | 9 +- .../middle-inline/fragment.yaml | 3 +- .../middle-inline/index.js | 2 +- .../middle-inline/input.yaml | 3 +- .../middle-inline/output.yaml | 9 +- .../start-block/fragment.yaml | 3 +- .../start-block/index.js | 2 +- .../start-block/input.yaml | 3 +- .../start-block/output.yaml | 3 +- .../start-inline/fragment.yaml | 3 +- .../start-inline/index.js | 2 +- .../start-inline/input.yaml | 3 +- .../start-inline/output.yaml | 6 +- .../start-second-block/fragment.yaml | 3 +- .../start-second-block/index.js | 2 +- .../start-second-block/input.yaml | 6 +- .../start-second-block/output.yaml | 6 +- .../with-delete-across-blocks/fragment.yaml | 3 +- .../with-delete-across-blocks/index.js | 2 +- .../with-delete-across-blocks/input.yaml | 6 +- .../with-delete-across-blocks/output.yaml | 3 +- .../insert-fragment/end-block/fragment.yaml | 3 +- .../insert-fragment/end-block/index.js | 2 +- .../insert-fragment/end-block/input.yaml | 3 +- .../insert-fragment/end-block/output.yaml | 3 +- .../insert-fragment/end-inline/fragment.yaml | 3 +- .../insert-fragment/end-inline/index.js | 2 +- .../insert-fragment/end-inline/input.yaml | 3 +- .../insert-fragment/end-inline/output.yaml | 6 +- .../index.js | 2 +- .../input.yaml | 3 +- .../output.yaml | 6 +- .../middle-block/fragment.yaml | 3 +- .../insert-fragment/middle-block/index.js | 2 +- .../insert-fragment/middle-block/input.yaml | 3 +- .../insert-fragment/middle-block/output.yaml | 3 +- .../fragment.yaml | 3 +- .../middle-inline-fragment-inline/index.js | 2 +- .../middle-inline-fragment-inline/input.yaml | 3 +- .../middle-inline-fragment-inline/output.yaml | 9 +- .../middle-inline/fragment.yaml | 3 +- .../insert-fragment/middle-inline/index.js | 2 +- .../insert-fragment/middle-inline/input.yaml | 3 +- .../insert-fragment/middle-inline/output.yaml | 9 +- .../insert-fragment/start-block/fragment.yaml | 3 +- .../insert-fragment/start-block/index.js | 2 +- .../insert-fragment/start-block/input.yaml | 3 +- .../insert-fragment/start-block/output.yaml | 3 +- .../start-inline/fragment.yaml | 3 +- .../insert-fragment/start-inline/index.js | 2 +- .../insert-fragment/start-inline/input.yaml | 3 +- .../insert-fragment/start-inline/output.yaml | 6 +- .../start-second-block/fragment.yaml | 3 +- .../start-second-block/index.js | 2 +- .../start-second-block/input.yaml | 6 +- .../start-second-block/output.yaml | 6 +- .../with-delete-across-blocks/fragment.yaml | 3 +- .../with-delete-across-blocks/index.js | 2 +- .../with-delete-across-blocks/input.yaml | 6 +- .../with-delete-across-blocks/output.yaml | 3 +- .../block-end/input.yaml | 3 +- .../block-end/output.yaml | 9 +- .../block-middle/input.yaml | 3 +- .../block-middle/output.yaml | 9 +- .../block-start/input.yaml | 3 +- .../block-start/output.yaml | 6 +- .../is-empty/input.yaml | 3 +- .../is-empty/output.yaml | 3 +- .../insert-inline-at-range/is-void/input.yaml | 3 +- .../is-void/output.yaml | 7 +- .../with-block/input.yaml | 3 +- .../with-block/output.yaml | 6 +- .../with-object/input.yaml | 3 +- .../with-object/output.yaml | 6 +- .../first-character/input.yaml | 3 +- .../first-character/output.yaml | 3 +- .../first-space/input.yaml | 3 +- .../first-space/output.yaml | 3 +- .../first-words/input.yaml | 3 +- .../first-words/output.yaml | 3 +- .../last-character/input.yaml | 3 +- .../last-character/output.yaml | 3 +- .../last-space/input.yaml | 3 +- .../last-space/output.yaml | 3 +- .../last-words/input.yaml | 3 +- .../last-words/output.yaml | 3 +- .../middle-character/input.yaml | 3 +- .../middle-character/output.yaml | 3 +- .../middle-space/input.yaml | 3 +- .../middle-space/output.yaml | 3 +- .../middle-words/input.yaml | 3 +- .../middle-words/output.yaml | 3 +- .../with-marks/input.yaml | 3 +- .../insert-text/first-character/input.yaml | 3 +- .../insert-text/first-character/output.yaml | 3 +- .../insert-text/first-space/input.yaml | 3 +- .../insert-text/first-space/output.yaml | 3 +- .../insert-text/first-words/input.yaml | 3 +- .../insert-text/first-words/output.yaml | 3 +- .../insert-text/last-character/input.yaml | 3 +- .../insert-text/last-character/output.yaml | 3 +- .../insert-text/last-space/input.yaml | 3 +- .../insert-text/last-space/output.yaml | 3 +- .../insert-text/last-words/input.yaml | 3 +- .../insert-text/last-words/output.yaml | 3 +- .../insert-text/middle-character/input.yaml | 3 +- .../insert-text/middle-character/output.yaml | 3 +- .../insert-text/middle-space/input.yaml | 3 +- .../insert-text/middle-space/output.yaml | 3 +- .../insert-text/middle-words/input.yaml | 3 +- .../insert-text/middle-words/output.yaml | 3 +- .../insert-text/with-marks/input.yaml | 3 +- .../whole-word/output.yaml | 3 +- .../with-mark-object/output.yaml | 3 +- .../with-plain-object/output.yaml | 3 +- .../remove-mark/across-blocks/output.yaml | 6 +- .../remove-mark/across-inlines/output.yaml | 6 +- .../collapsed-selection/input.yaml | 3 +- .../collapsed-selection/output.yaml | 3 +- .../remove-mark/first-character/output.yaml | 3 +- .../remove-mark/last-character/output.yaml | 3 +- .../remove-mark/middle-character/output.yaml | 3 +- .../remove-mark/whole-word/output.yaml | 3 +- .../remove-mark/with-mark-object/output.yaml | 3 +- .../remove-mark/with-plain-object/output.yaml | 3 +- .../remove-node-by-key/block/input.yaml | 6 +- .../remove-node-by-key/block/output.yaml | 3 +- .../remove-node-by-key/inline/input.yaml | 6 +- .../remove-node-by-key/inline/output.yaml | 3 +- .../remove-node-by-key/text/input.yaml | 3 +- .../remove-node-by-key/text/output.yaml | 3 +- .../across-blocks/input.yaml | 6 +- .../across-blocks/output.yaml | 6 +- .../across-inlines/input.yaml | 6 +- .../across-inlines/output.yaml | 6 +- .../set-block-at-range/data-only/input.yaml | 3 +- .../set-block-at-range/data-only/output.yaml | 3 +- .../nested-block/input.yaml | 3 +- .../nested-block/output.yaml | 3 +- .../single-block-string-shorthand/input.yaml | 3 +- .../single-block-string-shorthand/output.yaml | 3 +- .../single-block/input.yaml | 3 +- .../single-block/output.yaml | 3 +- .../with-data-object/input.yaml | 3 +- .../with-data-object/output.yaml | 3 +- .../set-block-at-range/with-data/input.yaml | 3 +- .../set-block-at-range/with-data/output.yaml | 3 +- .../with-is-void/input.yaml | 3 +- .../with-is-void/output.yaml | 4 - .../set-block/across-blocks/input.yaml | 6 +- .../set-block/across-blocks/output.yaml | 6 +- .../set-block/across-inlines/input.yaml | 6 +- .../set-block/across-inlines/output.yaml | 6 +- .../fixtures/set-block/data-only/input.yaml | 3 +- .../fixtures/set-block/data-only/output.yaml | 3 +- .../set-block/nested-block/input.yaml | 3 +- .../set-block/nested-block/output.yaml | 3 +- .../single-block-string-shorthand/input.yaml | 3 +- .../single-block-string-shorthand/output.yaml | 3 +- .../set-block/single-block/input.yaml | 3 +- .../set-block/single-block/output.yaml | 3 +- .../set-block/with-data-object/input.yaml | 3 +- .../set-block/with-data-object/output.yaml | 3 +- .../fixtures/set-block/with-data/input.yaml | 3 +- .../fixtures/set-block/with-data/output.yaml | 3 +- .../set-block/with-is-void/input.yaml | 3 +- .../set-block/with-is-void/output.yaml | 4 - .../across-inlines/input.yaml | 6 +- .../across-inlines/output.yaml | 6 +- .../set-inline-at-range/data-only/input.yaml | 3 +- .../set-inline-at-range/data-only/output.yaml | 3 +- .../nested-inline/input.yaml | 3 +- .../nested-inline/output.yaml | 3 +- .../single-inline-string-shorthand/input.yaml | 3 +- .../output.yaml | 3 +- .../single-inline/input.yaml | 3 +- .../single-inline/output.yaml | 3 +- .../with-data-object/input.yaml | 3 +- .../with-data-object/output.yaml | 3 +- .../set-inline-at-range/with-data/input.yaml | 3 +- .../set-inline-at-range/with-data/output.yaml | 3 +- .../with-is-void/input.yaml | 3 +- .../with-is-void/output.yaml | 4 - .../set-inline/across-inlines/input.yaml | 6 +- .../set-inline/across-inlines/output.yaml | 6 +- .../fixtures/set-inline/data-only/input.yaml | 3 +- .../fixtures/set-inline/data-only/output.yaml | 3 +- .../set-inline/nested-inline/input.yaml | 3 +- .../set-inline/nested-inline/output.yaml | 3 +- .../single-inline-string-shorthand/input.yaml | 3 +- .../output.yaml | 3 +- .../set-inline/single-inline/input.yaml | 3 +- .../set-inline/single-inline/output.yaml | 3 +- .../set-inline/with-data-object/input.yaml | 3 +- .../set-inline/with-data-object/output.yaml | 3 +- .../fixtures/set-inline/with-data/input.yaml | 3 +- .../fixtures/set-inline/with-data/output.yaml | 3 +- .../set-inline/with-is-void/input.yaml | 3 +- .../set-inline/with-is-void/output.yaml | 4 - .../single-block-string-shorthand/input.yaml | 3 +- .../single-block-string-shorthand/output.yaml | 3 +- .../set-node-by-key/single-block/input.yaml | 3 +- .../set-node-by-key/single-block/output.yaml | 3 +- .../split-block-at-range/block-end/input.yaml | 6 +- .../block-end/output.yaml | 9 +- .../block-middle/input.yaml | 3 +- .../block-middle/output.yaml | 6 +- .../block-start/input.yaml | 6 +- .../block-start/output.yaml | 9 +- .../split-block-at-range/depth/input.yaml | 3 +- .../split-block-at-range/depth/output.yaml | 6 +- .../input.yaml | 6 +- .../output.yaml | 9 +- .../with-delete-across-blocks/input.yaml | 6 +- .../with-delete-across-blocks/output.yaml | 6 +- .../with-delete/input.yaml | 3 +- .../with-delete/output.yaml | 6 +- .../with-inline/input.yaml | 3 +- .../with-inline/output.yaml | 6 +- .../fixtures/split-block/block-end/input.yaml | 6 +- .../split-block/block-end/output.yaml | 9 +- .../split-block/block-middle/input.yaml | 3 +- .../split-block/block-middle/output.yaml | 6 +- .../split-block/block-start/input.yaml | 6 +- .../split-block/block-start/output.yaml | 9 +- .../fixtures/split-block/depth/input.yaml | 3 +- .../fixtures/split-block/depth/output.yaml | 6 +- .../input.yaml | 6 +- .../output.yaml | 9 +- .../with-delete-across-blocks/input.yaml | 6 +- .../with-delete-across-blocks/output.yaml | 6 +- .../split-block/with-delete/input.yaml | 3 +- .../split-block/with-delete/output.yaml | 6 +- .../split-block/with-inline/input.yaml | 3 +- .../split-block/with-inline/output.yaml | 6 +- .../block-end/input.yaml | 3 +- .../block-end/output.yaml | 6 +- .../block-middle/input.yaml | 3 +- .../block-middle/output.yaml | 6 +- .../block-start/input.yaml | 3 +- .../block-start/output.yaml | 6 +- .../split-inline-at-range/depth/input.yaml | 3 +- .../split-inline-at-range/depth/output.yaml | 6 +- .../with-delete/input.yaml | 3 +- .../with-delete/output.yaml | 6 +- .../split-inline/block-end/input.yaml | 3 +- .../split-inline/block-end/output.yaml | 6 +- .../split-inline/block-middle/input.yaml | 3 +- .../split-inline/block-middle/output.yaml | 6 +- .../split-inline/block-start/input.yaml | 3 +- .../split-inline/block-start/output.yaml | 6 +- .../fixtures/split-inline/depth/input.yaml | 3 +- .../fixtures/split-inline/depth/output.yaml | 6 +- .../split-inline/with-delete/input.yaml | 3 +- .../split-inline/with-delete/output.yaml | 6 +- .../add-across-blocks/input.yaml | 6 +- .../add-across-inlines/input.yaml | 6 +- .../add-first-character/input.yaml | 3 +- .../add-last-character/input.yaml | 3 +- .../add-middle-character/input.yaml | 3 +- .../add-whole-word/input.yaml | 3 +- .../add-with-mark-object/input.yaml | 3 +- .../add-with-plain-object/input.yaml | 3 +- .../remove-whole-word/output.yaml | 3 +- .../remove-with-mark-object/output.yaml | 3 +- .../remove-with-plain-object/output.yaml | 3 +- .../toggle-mark/add-across-blocks/input.yaml | 6 +- .../toggle-mark/add-across-inlines/input.yaml | 6 +- .../add-collapsed-selection/input.yaml | 3 +- .../add-first-character/input.yaml | 3 +- .../toggle-mark/add-last-character/input.yaml | 3 +- .../add-middle-character/input.yaml | 3 +- .../toggle-mark/add-whole-word/input.yaml | 3 +- .../add-with-mark-object/input.yaml | 3 +- .../add-with-plain-object/input.yaml | 3 +- .../remove-across-blocks/output.yaml | 6 +- .../remove-across-inlines/output.yaml | 6 +- .../remove-collapsed-selection/input.yaml | 3 +- .../remove-collapsed-selection/output.yaml | 3 +- .../remove-first-character/output.yaml | 3 +- .../remove-last-character/output.yaml | 3 +- .../remove-middle-character/output.yaml | 3 +- .../toggle-mark/remove-whole-word/output.yaml | 3 +- .../remove-with-mark-object/output.yaml | 3 +- .../remove-with-plain-object/output.yaml | 3 +- .../across-blocks/input.yaml | 6 +- .../across-blocks/output.yaml | 6 +- .../across-inlines/input.yaml | 6 +- .../across-inlines/output.yaml | 6 +- .../ending-child-blocks/input.yaml | 18 +- .../ending-child-blocks/output.yaml | 18 +- .../middle-child-blocks/input.yaml | 18 +- .../middle-child-blocks/output.yaml | 18 +- .../nested-block/input.yaml | 3 +- .../nested-block/output.yaml | 3 +- .../single-block/input.yaml | 3 +- .../single-block/output.yaml | 3 +- .../starting-child-blocks/input.yaml | 18 +- .../starting-child-blocks/output.yaml | 18 +- .../with-data-object/input.yaml | 3 +- .../with-data-object/output.yaml | 3 +- .../with-data/input.yaml | 3 +- .../with-data/output.yaml | 3 +- .../unwrap-block/across-blocks/input.yaml | 6 +- .../unwrap-block/across-blocks/output.yaml | 6 +- .../unwrap-block/across-inlines/input.yaml | 6 +- .../unwrap-block/across-inlines/output.yaml | 6 +- .../ending-child-blocks/input.yaml | 18 +- .../ending-child-blocks/output.yaml | 18 +- .../middle-child-blocks/input.yaml | 18 +- .../middle-child-blocks/output.yaml | 18 +- .../unwrap-block/nested-block/input.yaml | 3 +- .../unwrap-block/nested-block/output.yaml | 3 +- .../unwrap-block/single-block/input.yaml | 3 +- .../unwrap-block/single-block/output.yaml | 3 +- .../starting-child-blocks/input.yaml | 18 +- .../starting-child-blocks/output.yaml | 18 +- .../unwrap-block/with-data-object/input.yaml | 3 +- .../unwrap-block/with-data-object/output.yaml | 3 +- .../unwrap-block/with-data/input.yaml | 3 +- .../unwrap-block/with-data/output.yaml | 3 +- .../across-blocks/input.yaml | 12 +- .../across-blocks/output.yaml | 6 +- .../across-inlines/input.yaml | 12 +- .../across-inlines/output.yaml | 12 +- .../nested-block/input.yaml | 9 +- .../nested-block/output.yaml | 3 +- .../single-block/input.yaml | 9 +- .../single-block/output.yaml | 3 +- .../with-data-object/input.yaml | 9 +- .../with-data-object/output.yaml | 9 +- .../with-data/input.yaml | 9 +- .../with-data/output.yaml | 9 +- .../unwrap-inline/across-blocks/input.yaml | 12 +- .../unwrap-inline/across-blocks/output.yaml | 6 +- .../unwrap-inline/across-inlines/input.yaml | 12 +- .../unwrap-inline/across-inlines/output.yaml | 12 +- .../unwrap-inline/nested-block/input.yaml | 9 +- .../unwrap-inline/nested-block/output.yaml | 3 +- .../unwrap-inline/single-block/input.yaml | 9 +- .../unwrap-inline/single-block/output.yaml | 3 +- .../unwrap-inline/with-data-object/input.yaml | 9 +- .../with-data-object/output.yaml | 9 +- .../unwrap-inline/with-data/input.yaml | 9 +- .../unwrap-inline/with-data/output.yaml | 9 +- .../across-blocks/input.yaml | 6 +- .../across-blocks/output.yaml | 6 +- .../across-inlines/input.yaml | 6 +- .../across-inlines/output.yaml | 6 +- .../nested-block/input.yaml | 3 +- .../nested-block/output.yaml | 3 +- .../single-block/input.yaml | 3 +- .../single-block/output.yaml | 3 +- .../with-data-object/input.yaml | 3 +- .../with-data-object/output.yaml | 3 +- .../wrap-block-at-range/with-data/input.yaml | 3 +- .../wrap-block-at-range/with-data/output.yaml | 3 +- .../wrap-block/across-blocks/input.yaml | 6 +- .../wrap-block/across-blocks/output.yaml | 6 +- .../wrap-block/across-inlines/input.yaml | 6 +- .../wrap-block/across-inlines/output.yaml | 6 +- .../wrap-block/nested-block/input.yaml | 3 +- .../wrap-block/nested-block/output.yaml | 3 +- .../wrap-block/single-block/input.yaml | 3 +- .../wrap-block/single-block/output.yaml | 3 +- .../wrap-block/with-data-object/input.yaml | 3 +- .../wrap-block/with-data-object/output.yaml | 3 +- .../fixtures/wrap-block/with-data/input.yaml | 3 +- .../fixtures/wrap-block/with-data/output.yaml | 3 +- .../across-blocks/input.yaml | 6 +- .../across-blocks/output.yaml | 12 +- .../across-inlines/input.yaml | 6 +- .../across-inlines/output.yaml | 12 +- .../nested-block/input.yaml | 3 +- .../nested-block/output.yaml | 9 +- .../single-block/input.yaml | 3 +- .../single-block/output.yaml | 9 +- .../with-data-object/input.yaml | 3 +- .../with-data-object/output.yaml | 9 +- .../wrap-inline-at-range/with-data/input.yaml | 3 +- .../with-data/output.yaml | 9 +- .../wrap-inline/across-blocks/input.yaml | 6 +- .../wrap-inline/across-blocks/output.yaml | 12 +- .../wrap-inline/across-inlines/input.yaml | 6 +- .../wrap-inline/across-inlines/output.yaml | 12 +- .../wrap-inline/nested-block/input.yaml | 3 +- .../wrap-inline/nested-block/output.yaml | 9 +- .../wrap-inline/single-block/input.yaml | 3 +- .../wrap-inline/single-block/output.yaml | 9 +- .../wrap-inline/with-data-object/input.yaml | 3 +- .../wrap-inline/with-data-object/output.yaml | 9 +- .../fixtures/wrap-inline/with-data/input.yaml | 3 +- .../wrap-inline/with-data/output.yaml | 9 +- test/transforms/index.js | 4 +- 602 files changed, 2266 insertions(+), 1986 deletions(-) create mode 100644 test/serializers/fixtures/raw/deserialize-terse/block-nested/input.yaml create mode 100644 test/serializers/fixtures/raw/deserialize-terse/block-nested/output.yaml create mode 100644 test/serializers/fixtures/raw/deserialize-terse/block-with-data/input.yaml create mode 100644 test/serializers/fixtures/raw/deserialize-terse/block-with-data/output.yaml create mode 100644 test/serializers/fixtures/raw/deserialize-terse/block-with-is-void/input.yaml create mode 100644 test/serializers/fixtures/raw/deserialize-terse/block-with-is-void/output.yaml create mode 100644 test/serializers/fixtures/raw/deserialize-terse/block/input.yaml rename test/serializers/fixtures/raw/{deserialize/text-without-range => deserialize-terse/block}/output.yaml (100%) create mode 100644 test/serializers/fixtures/raw/deserialize-terse/inline-nested/input.yaml create mode 100644 test/serializers/fixtures/raw/deserialize-terse/inline-nested/output.yaml create mode 100644 test/serializers/fixtures/raw/deserialize-terse/inline-with-data/input.yaml create mode 100644 test/serializers/fixtures/raw/deserialize-terse/inline-with-data/output.yaml create mode 100644 test/serializers/fixtures/raw/deserialize-terse/inline-with-is-void/input.yaml create mode 100644 test/serializers/fixtures/raw/deserialize-terse/inline-with-is-void/output.yaml create mode 100644 test/serializers/fixtures/raw/deserialize-terse/inline/input.yaml create mode 100644 test/serializers/fixtures/raw/deserialize-terse/inline/output.yaml create mode 100644 test/serializers/fixtures/raw/deserialize-terse/range-with-mark/input.yaml create mode 100644 test/serializers/fixtures/raw/deserialize-terse/range-with-mark/output.yaml rename test/serializers/fixtures/raw/{deserialize => deserialize-terse}/text-without-range/input.yaml (100%) create mode 100644 test/serializers/fixtures/raw/deserialize-terse/text-without-range/output.yaml create mode 100644 test/serializers/fixtures/raw/serialize-terse/block-nested/input.js create mode 100644 test/serializers/fixtures/raw/serialize-terse/block-nested/output.yaml create mode 100644 test/serializers/fixtures/raw/serialize-terse/block-with-data/input.js create mode 100644 test/serializers/fixtures/raw/serialize-terse/block-with-data/output.yaml create mode 100644 test/serializers/fixtures/raw/serialize-terse/block-with-is-void/input.js create mode 100644 test/serializers/fixtures/raw/serialize-terse/block-with-is-void/output.yaml create mode 100644 test/serializers/fixtures/raw/serialize-terse/block/input.js create mode 100644 test/serializers/fixtures/raw/serialize-terse/block/output.yaml create mode 100644 test/serializers/fixtures/raw/serialize-terse/character-with-mark/input.js create mode 100644 test/serializers/fixtures/raw/serialize-terse/character-with-mark/output.yaml create mode 100644 test/serializers/fixtures/raw/serialize-terse/inline-nested/input.js create mode 100644 test/serializers/fixtures/raw/serialize-terse/inline-nested/output.yaml create mode 100644 test/serializers/fixtures/raw/serialize-terse/inline-with-data/input.js create mode 100644 test/serializers/fixtures/raw/serialize-terse/inline-with-data/output.yaml create mode 100644 test/serializers/fixtures/raw/serialize-terse/inline-with-is-void/input.js create mode 100644 test/serializers/fixtures/raw/serialize-terse/inline-with-is-void/output.yaml create mode 100644 test/serializers/fixtures/raw/serialize-terse/inline/input.js create mode 100644 test/serializers/fixtures/raw/serialize-terse/inline/output.yaml diff --git a/History.md b/History.md index a2463396e..89631323b 100644 --- a/History.md +++ b/History.md @@ -5,6 +5,13 @@ This document maintains a list of changes to Slate with each new version. Until --- +### `0.7.0` — _July 24, 2016_ + +#### BREAKING CHANGES + +- **The `Raw` serializer is no longer terse by default!** Previously, the `Raw` serializer would return a "terse" representation of the document, omitting information that wasn't _strictly_ necessary to deserialize later, like the `key` of nodes. By default this no longer happens. You have to opt-in to the behavior by passing `{ terse: true }` as the second `options` argument of the `deserialize` and `serialize` methods. + + ### `0.6.0` — _July 22, 2016_ #### BREAKING CHANGES diff --git a/docs/reference/serializers/raw.md b/docs/reference/serializers/raw.md index 9dac1e053..bd26f8dc6 100644 --- a/docs/reference/serializers/raw.md +++ b/docs/reference/serializers/raw.md @@ -7,10 +7,10 @@ import { Raw } from 'slate' The raw JSON serialized that ships by default with Slate. It converts a [`State`](../models/state.md) into a JSON object. -The raw JSON object created will omit default-value properties to reduce the serialized data's size. For example, if the dictionary of [`Data`](../models/data.md) for a [`Node`](../models/node.md) is empty, it will be omitted. - In the raw format, text is represented as "ranges", which are a more compact way to represent the formatting applied to characters than the immutable model Slate uses internally. +When saving the data to size-sensitive places, you the raw serializer can be told to omit properties that aren't _strictly_ required to deserialize later, reducing the serialized data's size. For example, if the dictionary of [`Data`](../models/data.md) for a [`Node`](../models/node.md) is empty, it will be omitted. + - [Example](#example) - [Static Methods](#methods) - [`Raw.deserialize`](#rawdeserialize) @@ -123,11 +123,11 @@ In the raw format, text is represented as "ranges", which are a more compact way ## Methods ### `Raw.deserialize` -`Raw.deserialize(object: Object) => State` +`Raw.deserialize(object: Object, [options: Object]) => State` -Deserialize a raw JSON `object` into a [`State`](../models/state.md). +Deserialize a raw JSON `object` into a [`State`](../models/state.md). You must pass the `terse: true` option if you want to deserialize a state that was previously serialized with `terse: true`. ### `Raw.serialize` -`Raw.serialize(state: State) => Object` +`Raw.serialize(state: State, [options: Object]) => Object` -Serialize a `state` into a raw JSON object. +Serialize a `state` into a raw JSON object. If you pass the `terse: true` option, the serialized format will omit properties that aren't _strictly_ required to deserialize later, reducing the serialized data's size. For example, if the dictionary of [`Data`](../models/data.md) for a [`Node`](../models/node.md) is empty, it will be omitted. diff --git a/lib/index.js b/lib/index.js index 6680f4291..51488e4b9 100644 --- a/lib/index.js +++ b/lib/index.js @@ -27,6 +27,7 @@ import Text from './models/text' */ import Html from './serializers/html' +import Json from './serializers/json' import Plain from './serializers/plain' import Raw from './serializers/raw' @@ -55,6 +56,7 @@ export { Editor, Html, Inline, + Json, Mark, Placeholder, Plain, @@ -75,6 +77,7 @@ export default { Editor, Html, Inline, + Json, Mark, Placeholder, Plain, diff --git a/lib/serializers/html.js b/lib/serializers/html.js index 631ceb499..f98ca18cb 100644 --- a/lib/serializers/html.js +++ b/lib/serializers/html.js @@ -33,14 +33,14 @@ const TEXT_RULE = { if (el.tagName == 'br') { return { kind: 'text', - ranges: [{ text: '\n' }] + text: '\n' } } if (el.type == 'text') { return { kind: 'text', - ranges: [{ text: el.data }] + text: el.data } } }, @@ -117,7 +117,7 @@ class Html { return memo }, []) - const state = Raw.deserialize({ nodes }) + const state = Raw.deserialize({ nodes }, { terse: true }) return state } @@ -188,6 +188,7 @@ class Html { } else if (node.kind == 'text') { + if (!node.ranges) node.ranges = [{ text: node.text }] node.ranges = node.ranges.map((range) => { range.marks = range.marks || [] range.marks.push({ type, data }) diff --git a/lib/serializers/raw.js b/lib/serializers/raw.js index 87a5da981..685fa86b8 100644 --- a/lib/serializers/raw.js +++ b/lib/serializers/raw.js @@ -6,191 +6,577 @@ import Inline from '../models/inline' import Mark from '../models/mark' import State from '../models/state' import Text from '../models/text' +import isEmpty from 'is-empty' /** - * Serialize a `state`. + * Raw. * - * @param {State} state - * @return {Object} object + * @type {Object} */ -function serialize(state) { - return serializeNode(state.document) -} +const Raw = { -/** - * Serialize a `node`. - * - * @param {Node} node - * @return {Object} object - */ + /** + * Deserialize a JSON `object`. + * + * @param {Object} object + * @param {Object} options (optional) + * @return {Block} + */ -function serializeNode(node) { - switch (node.kind) { - case 'document': { - return { - nodes: node.nodes.toArray().map(child => serializeNode(child)) + deserialize(object, options) { + return Raw.deserializeState(object, options) + }, + + /** + * Deserialize a JSON `object` representing a `Block`. + * + * @param {Object} object + * @param {Object} options (optional) + * @return {Block} + */ + + deserializeBlock(object, options = {}) { + if (options.terse) object = Raw.untersifyBlock(object) + + return Block.create({ + key: object.key, + type: object.type, + data: object.data, + isVoid: object.isVoid, + nodes: Block.createList(object.nodes.map((node) => { + return Raw.deserializeNode(node, options) + })) + }) + }, + + /** + * Deserialize a JSON `object` representing a `Document`. + * + * @param {Object} object + * @param {Object} options (optional) + * @return {Document} + */ + + deserializeDocument(object, options) { + return Document.create({ + nodes: Block.createList(object.nodes.map((node) => { + return Raw.deserializeNode(node, options) + })) + }) + }, + + /** + * Deserialize a JSON `object` representing an `Inline`. + * + * @param {Object} object + * @param {Object} options (optional) + * @return {Inline} + */ + + deserializeInline(object, options = {}) { + if (options.terse) object = Raw.untersifyInline(object) + + return Inline.create({ + key: object.key, + type: object.type, + data: object.data, + isVoid: object.isVoid, + nodes: Inline.createList(object.nodes.map((node) => { + return Raw.deserializeNode(node, options) + })) + }) + }, + + /** + * Deserialize a JSON `object` representing a `Mark`. + * + * @param {Object} object + * @param {Object} options (optional) + * @return {Mark} mark + */ + + deserializeMark(object, options) { + return Mark.create(object) + }, + + /** + * Deserialize a JSON object representing a `Node`. + * + * @param {Object} object + * @param {Object} options (optional) + * @return {Text} + */ + + deserializeNode(object, options) { + switch (object.kind) { + case 'block': return Raw.deserializeBlock(object, options) + case 'document': return Raw.deserializeDocument(object, options) + case 'inline': return Raw.deserializeInline(object, options) + case 'text': return Raw.deserializeText(object, options) + default: { + throw new Error(`Unrecognized node kind "${object.kind}".`) } } - case 'text': { - const obj = {} - obj.key = node.key - obj.kind = node.kind - obj.ranges = serializeRanges(node) - return obj - } - case 'block': - case 'inline': { - const obj = {} - obj.key = node.key - obj.kind = node.kind - obj.type = node.type - obj.nodes = node.nodes.toArray().map(child => serializeNode(child)) - if (node.isVoid) obj.isVoid = node.isVoid - if (node.data.size) obj.data = node.data.toJSON() - return obj - } - default: { - throw new Error(`Unknown node kind "${node.kind}".`) - } - } -} + }, -/** - * Serialize the ranges of a text `node`. - * - * @param {Text} text - * @return {Array} - */ + /** + * Deserialize a JSON `object` representing a `Range`. + * + * @param {Object} object + * @param {Object} options (optional) + * @return {List} + */ -function serializeRanges(text) { - return text - .getRanges() - .toArray() - .map((range) => { - const obj = {} - obj.text = range.text - if (range.marks.size) obj.marks = range.marks.toArray().map(serializeMark) - return obj - }) -} + deserializeRange(object, options = {}) { + if (options.terse) object = Raw.untersifyRange(object) -/** - * Serialize a `mark`. - * - * @param {Mark} mark - * @return {Object} Object - */ - -function serializeMark(mark) { - const obj = {} - obj.type = mark.type - if (mark.data.size) obj.data = mark.data.toJSON() - return obj -} - -/** - * Deserialize a state JSON `object`. - * - * @param {Object} object - * @return {State} state - */ - -function deserialize(object) { - return State.create({ - document: Document.create({ - nodes: Block.createList(object.nodes.map(deserializeNode)) - }) - }) -} - -/** - * Deserialize a node JSON `object`. - * - * @param {Object} object - * @return {Node} node - */ - -function deserializeNode(object) { - switch (object.kind) { - case 'block': { - return Block.create({ - key: object.key, - type: object.type, - data: object.data, - isVoid: object.isVoid, - nodes: Block.createList((object.nodes || []).map(deserializeNode)) - }) - } - case 'inline': { - return Inline.create({ - key: object.key, - type: object.type, - data: object.data, - isVoid: object.isVoid, - nodes: Inline.createList((object.nodes || []).map(deserializeNode)) - }) - } - case 'text': { - if (object.ranges == null && object.text != null) { - object.ranges = [{ text: object.text }] - } - - return Text.create({ - key: object.key, - characters: object.ranges ? deserializeRanges(object.ranges) : '' - }) - } - default: { - throw new Error(`Unknown node kind "${object.kind}".`) - } - } -} - -/** - * Deserialize a JSON `array` of ranges. - * - * @param {Array} array - * @return {List} characters - */ - -function deserializeRanges(array = []) { - return array.reduce((characters, object) => { - const marks = object.marks || [] - const chars = object.text + return Character.createList(object.text .split('') .map((char) => { return Character.create({ text: char, - marks: Mark.createSet(marks.map(deserializeMark)) + marks: Mark.createSet(object.marks.map((mark) => { + return Raw.deserializeMark(mark, options) + })) }) - }) + })) + }, - return characters.push(...chars) - }, Character.createList()) -} + /** + * Deserialize a JSON `object` representing a `State`. + * + * @param {Object} object + * @param {Object} options (optional) + * @return {State} + */ -/** - * Deserialize a mark JSON `object`. - * - * @param {Object} object - * @return {Mark} mark - */ + deserializeState(object, options = {}) { + if (options.terse) object = Raw.untersifyState(object) -function deserializeMark(object) { - return Mark.create(object) + return State.create({ + document: Raw.deserializeDocument(object.document, options) + }) + }, + + /** + * Deserialize a JSON `object` representing a `Text`. + * + * @param {Object} object + * @param {Object} options (optional) + * @return {Text} + */ + + deserializeText(object, options = {}) { + if (options.terse) object = Raw.untersifyText(object) + + return Text.create({ + key: object.key, + characters: object.ranges.reduce((characters, range) => { + return characters.concat(Raw.deserializeRange(range, options)) + }, Character.createList()) + }) + }, + + /** + * Serialize a `model`. + * + * @param {Mixed} model + * @param {Object} options (optional) + * @return {Object} + */ + + serialize(model, options) { + return Raw.serializeState(model, options) + }, + + /** + * Serialize a `block` node. + * + * @param {Block} block + * @param {Object} options (optional) + * @return {Object} + */ + + serializeBlock(block, options = {}) { + const object = { + data: block.data.toJSON(), + key: block.key, + kind: block.kind, + isVoid: block.isVoid, + type: block.type, + nodes: block.nodes + .toArray() + .map(node => Raw.serializeNode(node, options)) + } + + return options.terse + ? Raw.tersifyBlock(object) + : object + }, + + /** + * Serialize a `document`. + * + * @param {Document} document + * @param {Object} options (optional) + * @return {Object} + */ + + serializeDocument(document, options = {}) { + const object = { + kind: document.kind, + nodes: document.nodes + .toArray() + .map(node => Raw.serializeNode(node, options)) + } + + return options.terse + ? Raw.tersifyDocument(object) + : object + }, + + /** + * Serialize an `inline` node. + * + * @param {Inline} inline + * @param {Object} options (optional) + * @return {Object} + */ + + serializeInline(inline, options = {}) { + const object = { + data: inline.data.toJSON(), + key: inline.key, + kind: inline.kind, + isVoid: inline.isVoid, + type: inline.type, + nodes: inline.nodes + .toArray() + .map(node => Raw.serializeNode(node, options)) + } + + return options.terse + ? Raw.tersifyInline(object) + : object + }, + + /** + * Serialize a `mark`. + * + * @param {Mark} mark + * @param {Object} options (optional) + * @return {Object} Object + */ + + serializeMark(mark, options = {}) { + const object = { + data: mark.data.toJSON(), + kind: mark.kind, + type: mark.type + } + + return options.terse + ? Raw.tersifyMark(object) + : object + }, + + /** + * Serialize a `node`. + * + * @param {Node} node + * @param {Object} options (optional) + * @return {Object} object + */ + + serializeNode(node, options) { + switch (node.kind) { + case 'block': return Raw.serializeBlock(node, options) + case 'document': return Raw.serializeDocument(node, options) + case 'inline': return Raw.serializeInline(node, options) + case 'text': return Raw.serializeText(node, options) + default: { + throw new Error(`Unrecognized node kind "${node.kind}".`) + } + } + }, + + /** + * Serialize a `range`. + * + * @param {Range} range + * @param {Object} options (optional) + * @return {Object} + */ + + serializeRange(range, options = {}) { + const object = { + kind: range.kind, + text: range.text, + marks: range.marks + .toArray() + .map(mark => Raw.serializeMark(mark, options)) + } + + return options.terse + ? Raw.tersifyRange(object) + : object + }, + + /** + * Serialize a `state`. + * + * @param {State} state + * @param {Object} options (optional) + * @return {Object} + */ + + serializeState(state, options = {}) { + const object = { + document: Raw.serializeDocument(state.document, options), + kind: state.kind + } + + return options.terse + ? Raw.tersifyState(object) + : object + }, + + /** + * Serialize a `text` node. + * + * @param {Text} text + * @param {Object} options (optional) + * @return {Object} + */ + + serializeText(text, options = {}) { + const object = { + key: text.key, + kind: text.kind, + ranges: text + .getRanges() + .toArray() + .map(range => Raw.serializeRange(range, options)) + } + + return options.terse + ? Raw.tersifyText(object) + : object + }, + + /** + * Create a terse representation of a block `object`. + * + * @param {Object} object + * @return {Object} + */ + + tersifyBlock(object) { + const ret = {} + ret.kind = object.kind + ret.type = object.type + if (!object.isVoid) ret.nodes = object.nodes + if (object.isVoid) ret.isVoid = object.isVoid + if (!isEmpty(object.data)) ret.data = object.data + return ret + }, + + /** + * Create a terse representation of a document `object. + * + * @param {Object} object + * @return {Object} + */ + + tersifyDocument(object) { + return { + nodes: object.nodes + } + }, + + /** + * Create a terse representation of a inline `object`. + * + * @param {Object} object + * @return {Object} + */ + + tersifyInline(object) { + const ret = {} + ret.kind = object.kind + ret.type = object.type + if (!object.isVoid) ret.nodes = object.nodes + if (object.isVoid) ret.isVoid = object.isVoid + if (!isEmpty(object.data)) ret.data = object.data + return ret + }, + + /** + * Create a terse representation of a mark `object`. + * + * @param {Object} object + * @return {Object} + */ + + tersifyMark(object) { + const ret = {} + ret.type = object.type + if (!isEmpty(object.data)) ret.data = object.data + return ret + }, + + /** + * Create a terse representation of a range `object`. + * + * @param {Object} object + * @return {Object} + */ + + tersifyRange(object) { + const ret = {} + ret.text = object.text + if (!isEmpty(object.marks)) ret.marks = object.marks + return ret + }, + + /** + * Create a terse representation of a state `object`. + * + * @param {Object} object + * @return {Object} + */ + + tersifyState(object) { + return object.document + }, + + /** + * Create a terse representation of a text `object`. + * + * @param {Object} object + * @return {Object} + */ + + tersifyText(object) { + if (object.ranges.length == 1 && object.ranges[0].marks == null) { + return { + kind: object.kind, + text: object.ranges[0].text + } + } + + return { + kind: object.kind, + ranges: object.ranges + } + }, + + /** + * Convert a terse representation of a block `object` into a non-terse one. + * + * @param {Object} object + * @return {Object} + */ + + untersifyBlock(object) { + if (object.isVoid) { + return { + data: object.data, + kind: object.kind, + type: object.type, + isVoid: object.isVoid, + nodes: [ + { + kind: 'text', + text: '' + } + ] + } + } + + return object + }, + + /** + * Convert a terse representation of a inline `object` into a non-terse one. + * + * @param {Object} object + * @return {Object} + */ + + untersifyInline(object) { + if (object.isVoid) { + return { + data: object.data, + kind: object.kind, + type: object.type, + isVoid: object.isVoid, + nodes: [ + { + kind: 'text', + text: '' + } + ] + } + } + + return object + }, + + /** + * Convert a terse representation of a range `object` into a non-terse one. + * + * @param {Object} object + * @return {Object} + */ + + untersifyRange(object) { + return { + kind: 'range', + text: object.text, + marks: object.marks || [] + } + }, + + /** + * Convert a terse representation of a state `object` into a non-terse one. + * + * @param {Object} object + * @return {Object} + */ + + untersifyState(object) { + return { + kind: 'state', + document: { + kind: 'document', + nodes: object.nodes + } + } + }, + + /** + * Convert a terse representation of a text `object` into a non-terse one. + * + * @param {Object} object + * @return {Object} + */ + + untersifyText(object) { + if (object.ranges) return object + + return { + kind: object.kind, + ranges: [{ + text: object.text + }] + } + } } /** * Export. */ -export default { - serialize, - serializeRanges, - serializeMark, - serializeNode, - deserialize, - deserializeNode, - deserializeRanges -} +export default Raw diff --git a/package.json b/package.json index 506c56e80..e8eeffb54 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "es6-symbol": "^3.1.0", "esrever": "^0.2.0", "immutable": "^3.8.1", + "is-empty": "^1.0.0", "keycode": "^2.1.2", "lodash": "^4.13.1", "react-portal": "^2.2.0", diff --git a/test/rendering/fixtures/custom-block-void/input.yaml b/test/rendering/fixtures/custom-block-void/input.yaml index c02f43e13..e891aeb38 100644 --- a/test/rendering/fixtures/custom-block-void/input.yaml +++ b/test/rendering/fixtures/custom-block-void/input.yaml @@ -5,7 +5,3 @@ nodes: isVoid: true data: src: https://img.washingtonpost.com/wp-apps/imrs.php?src=https://img.washingtonpost.com/news/speaking-of-science/wp-content/uploads/sites/36/2015/10/as12-49-7278-1024x1024.jpg&w=1484 - nodes: - - kind: text - ranges: - - text: another diff --git a/test/rendering/index.js b/test/rendering/index.js index 6c773e47c..ee396c36d 100644 --- a/test/rendering/index.js +++ b/test/rendering/index.js @@ -21,7 +21,7 @@ describe('rendering', () => { const input = readMetadata.sync(resolve(dir, 'input.yaml')) const output = fs.readFileSync(resolve(dir, 'output.html'), 'utf8') const props = { - state: Raw.deserialize(input), + state: Raw.deserialize(input, { terse: true }), onChange: () => {}, ...require(dir) } diff --git a/test/serializers/fixtures/raw/deserialize-terse/block-nested/input.yaml b/test/serializers/fixtures/raw/deserialize-terse/block-nested/input.yaml new file mode 100644 index 000000000..aba50d05d --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/block-nested/input.yaml @@ -0,0 +1,11 @@ + +nodes: + - kind: block + type: quote + nodes: + - kind: block + type: paragraph + nodes: + - kind: text + ranges: + - text: one diff --git a/test/serializers/fixtures/raw/deserialize-terse/block-nested/output.yaml b/test/serializers/fixtures/raw/deserialize-terse/block-nested/output.yaml new file mode 100644 index 000000000..f46e65acb --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/block-nested/output.yaml @@ -0,0 +1,17 @@ + +nodes: + - type: quote + isVoid: false + data: {} + nodes: + - type: paragraph + isVoid: false + data: {} + nodes: + - characters: + - text: o + marks: [] + - text: n + marks: [] + - text: e + marks: [] diff --git a/test/serializers/fixtures/raw/deserialize-terse/block-with-data/input.yaml b/test/serializers/fixtures/raw/deserialize-terse/block-with-data/input.yaml new file mode 100644 index 000000000..1100f59c1 --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/block-with-data/input.yaml @@ -0,0 +1,10 @@ + +nodes: + - kind: block + type: paragraph + data: + key: value + nodes: + - kind: text + ranges: + - text: one diff --git a/test/serializers/fixtures/raw/deserialize-terse/block-with-data/output.yaml b/test/serializers/fixtures/raw/deserialize-terse/block-with-data/output.yaml new file mode 100644 index 000000000..183a31ee8 --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/block-with-data/output.yaml @@ -0,0 +1,14 @@ + +nodes: + - type: paragraph + isVoid: false + data: + key: value + nodes: + - characters: + - text: o + marks: [] + - text: n + marks: [] + - text: e + marks: [] diff --git a/test/serializers/fixtures/raw/deserialize-terse/block-with-is-void/input.yaml b/test/serializers/fixtures/raw/deserialize-terse/block-with-is-void/input.yaml new file mode 100644 index 000000000..009766839 --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/block-with-is-void/input.yaml @@ -0,0 +1,9 @@ + +nodes: + - kind: block + type: paragraph + isVoid: true + nodes: + - kind: text + ranges: + - text: one diff --git a/test/serializers/fixtures/raw/deserialize-terse/block-with-is-void/output.yaml b/test/serializers/fixtures/raw/deserialize-terse/block-with-is-void/output.yaml new file mode 100644 index 000000000..c18f3f47e --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/block-with-is-void/output.yaml @@ -0,0 +1,7 @@ + +nodes: + - type: paragraph + isVoid: true + data: {} + nodes: + - characters: [] diff --git a/test/serializers/fixtures/raw/deserialize-terse/block/input.yaml b/test/serializers/fixtures/raw/deserialize-terse/block/input.yaml new file mode 100644 index 000000000..a9bf9ed14 --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/block/input.yaml @@ -0,0 +1,8 @@ + +nodes: + - kind: block + type: paragraph + nodes: + - kind: text + ranges: + - text: one diff --git a/test/serializers/fixtures/raw/deserialize/text-without-range/output.yaml b/test/serializers/fixtures/raw/deserialize-terse/block/output.yaml similarity index 100% rename from test/serializers/fixtures/raw/deserialize/text-without-range/output.yaml rename to test/serializers/fixtures/raw/deserialize-terse/block/output.yaml diff --git a/test/serializers/fixtures/raw/deserialize-terse/inline-nested/input.yaml b/test/serializers/fixtures/raw/deserialize-terse/inline-nested/input.yaml new file mode 100644 index 000000000..edab6c050 --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/inline-nested/input.yaml @@ -0,0 +1,14 @@ + +nodes: + - kind: block + type: paragraph + nodes: + - kind: inline + type: link + nodes: + - kind: inline + type: hashtag + nodes: + - kind: text + ranges: + - text: one diff --git a/test/serializers/fixtures/raw/deserialize-terse/inline-nested/output.yaml b/test/serializers/fixtures/raw/deserialize-terse/inline-nested/output.yaml new file mode 100644 index 000000000..6cc09ef75 --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/inline-nested/output.yaml @@ -0,0 +1,21 @@ + +nodes: + - type: paragraph + isVoid: false + data: {} + nodes: + - type: link + isVoid: false + data: {} + nodes: + - type: hashtag + isVoid: false + data: {} + nodes: + - characters: + - text: o + marks: [] + - text: n + marks: [] + - text: e + marks: [] diff --git a/test/serializers/fixtures/raw/deserialize-terse/inline-with-data/input.yaml b/test/serializers/fixtures/raw/deserialize-terse/inline-with-data/input.yaml new file mode 100644 index 000000000..92f4c8e21 --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/inline-with-data/input.yaml @@ -0,0 +1,13 @@ + +nodes: + - kind: block + type: paragraph + nodes: + - kind: inline + type: link + data: + key: value + nodes: + - kind: text + ranges: + - text: one diff --git a/test/serializers/fixtures/raw/deserialize-terse/inline-with-data/output.yaml b/test/serializers/fixtures/raw/deserialize-terse/inline-with-data/output.yaml new file mode 100644 index 000000000..518f9fa8c --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/inline-with-data/output.yaml @@ -0,0 +1,18 @@ + +nodes: + - type: paragraph + isVoid: false + data: {} + nodes: + - type: link + isVoid: false + data: + key: value + nodes: + - characters: + - text: o + marks: [] + - text: n + marks: [] + - text: e + marks: [] diff --git a/test/serializers/fixtures/raw/deserialize-terse/inline-with-is-void/input.yaml b/test/serializers/fixtures/raw/deserialize-terse/inline-with-is-void/input.yaml new file mode 100644 index 000000000..13ee4a612 --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/inline-with-is-void/input.yaml @@ -0,0 +1,12 @@ + +nodes: + - kind: block + type: paragraph + nodes: + - kind: inline + type: link + isVoid: true + nodes: + - kind: text + ranges: + - text: one diff --git a/test/serializers/fixtures/raw/deserialize-terse/inline-with-is-void/output.yaml b/test/serializers/fixtures/raw/deserialize-terse/inline-with-is-void/output.yaml new file mode 100644 index 000000000..d43f53514 --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/inline-with-is-void/output.yaml @@ -0,0 +1,11 @@ + +nodes: + - type: paragraph + isVoid: false + data: {} + nodes: + - type: link + isVoid: true + data: {} + nodes: + - characters: [] diff --git a/test/serializers/fixtures/raw/deserialize-terse/inline/input.yaml b/test/serializers/fixtures/raw/deserialize-terse/inline/input.yaml new file mode 100644 index 000000000..875b0c4b4 --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/inline/input.yaml @@ -0,0 +1,11 @@ + +nodes: + - kind: block + type: paragraph + nodes: + - kind: inline + type: link + nodes: + - kind: text + ranges: + - text: one diff --git a/test/serializers/fixtures/raw/deserialize-terse/inline/output.yaml b/test/serializers/fixtures/raw/deserialize-terse/inline/output.yaml new file mode 100644 index 000000000..963558dc1 --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/inline/output.yaml @@ -0,0 +1,17 @@ + +nodes: + - type: paragraph + isVoid: false + data: {} + nodes: + - type: link + isVoid: false + data: {} + nodes: + - characters: + - text: o + marks: [] + - text: n + marks: [] + - text: e + marks: [] diff --git a/test/serializers/fixtures/raw/deserialize-terse/range-with-mark/input.yaml b/test/serializers/fixtures/raw/deserialize-terse/range-with-mark/input.yaml new file mode 100644 index 000000000..c852eea9d --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/range-with-mark/input.yaml @@ -0,0 +1,12 @@ + +nodes: + - kind: block + type: paragraph + nodes: + - kind: text + ranges: + - text: o + - text: n + marks: + - type: bold + - text: e diff --git a/test/serializers/fixtures/raw/deserialize-terse/range-with-mark/output.yaml b/test/serializers/fixtures/raw/deserialize-terse/range-with-mark/output.yaml new file mode 100644 index 000000000..83b8211b1 --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/range-with-mark/output.yaml @@ -0,0 +1,15 @@ + +nodes: + - type: paragraph + isVoid: false + data: {} + nodes: + - characters: + - text: o + marks: [] + - text: n + marks: + - type: bold + data: {} + - text: e + marks: [] diff --git a/test/serializers/fixtures/raw/deserialize/text-without-range/input.yaml b/test/serializers/fixtures/raw/deserialize-terse/text-without-range/input.yaml similarity index 100% rename from test/serializers/fixtures/raw/deserialize/text-without-range/input.yaml rename to test/serializers/fixtures/raw/deserialize-terse/text-without-range/input.yaml diff --git a/test/serializers/fixtures/raw/deserialize-terse/text-without-range/output.yaml b/test/serializers/fixtures/raw/deserialize-terse/text-without-range/output.yaml new file mode 100644 index 000000000..4c208207b --- /dev/null +++ b/test/serializers/fixtures/raw/deserialize-terse/text-without-range/output.yaml @@ -0,0 +1,13 @@ + +nodes: + - type: paragraph + isVoid: false + data: {} + nodes: + - characters: + - text: o + marks: [] + - text: n + marks: [] + - text: e + marks: [] diff --git a/test/serializers/fixtures/raw/deserialize/block-nested/input.yaml b/test/serializers/fixtures/raw/deserialize/block-nested/input.yaml index aba50d05d..3636ed29a 100644 --- a/test/serializers/fixtures/raw/deserialize/block-nested/input.yaml +++ b/test/serializers/fixtures/raw/deserialize/block-nested/input.yaml @@ -1,11 +1,16 @@ -nodes: - - kind: block - type: quote - nodes: - - kind: block - type: paragraph - nodes: - - kind: text - ranges: - - text: one +kind: state +document: + kind: document + nodes: + - kind: block + type: quote + nodes: + - kind: block + type: paragraph + nodes: + - kind: text + ranges: + - kind: range + text: one + marks: [] diff --git a/test/serializers/fixtures/raw/deserialize/block-with-data/input.yaml b/test/serializers/fixtures/raw/deserialize/block-with-data/input.yaml index 1100f59c1..9db0fbaa9 100644 --- a/test/serializers/fixtures/raw/deserialize/block-with-data/input.yaml +++ b/test/serializers/fixtures/raw/deserialize/block-with-data/input.yaml @@ -1,10 +1,15 @@ -nodes: - - kind: block - type: paragraph - data: - key: value - nodes: - - kind: text - ranges: - - text: one +kind: state +document: + kind: document + nodes: + - kind: block + type: paragraph + data: + key: value + nodes: + - kind: text + ranges: + - kind: range + text: one + marks: [] diff --git a/test/serializers/fixtures/raw/deserialize/block-with-is-void/input.yaml b/test/serializers/fixtures/raw/deserialize/block-with-is-void/input.yaml index 009766839..52e24e540 100644 --- a/test/serializers/fixtures/raw/deserialize/block-with-is-void/input.yaml +++ b/test/serializers/fixtures/raw/deserialize/block-with-is-void/input.yaml @@ -1,9 +1,14 @@ -nodes: - - kind: block - type: paragraph - isVoid: true - nodes: - - kind: text - ranges: - - text: one +kind: state +document: + kind: document + nodes: + - kind: block + type: paragraph + isVoid: true + nodes: + - kind: text + ranges: + - kind: range + text: one + marks: [] diff --git a/test/serializers/fixtures/raw/deserialize/block/input.yaml b/test/serializers/fixtures/raw/deserialize/block/input.yaml index a9bf9ed14..b2946a464 100644 --- a/test/serializers/fixtures/raw/deserialize/block/input.yaml +++ b/test/serializers/fixtures/raw/deserialize/block/input.yaml @@ -1,8 +1,13 @@ -nodes: - - kind: block - type: paragraph - nodes: - - kind: text - ranges: - - text: one +kind: state +document: + kind: document + nodes: + - kind: block + type: paragraph + nodes: + - kind: text + ranges: + - kind: range + text: one + marks: [] diff --git a/test/serializers/fixtures/raw/deserialize/inline-nested/input.yaml b/test/serializers/fixtures/raw/deserialize/inline-nested/input.yaml index edab6c050..bc9211873 100644 --- a/test/serializers/fixtures/raw/deserialize/inline-nested/input.yaml +++ b/test/serializers/fixtures/raw/deserialize/inline-nested/input.yaml @@ -1,14 +1,19 @@ -nodes: - - kind: block - type: paragraph - nodes: - - kind: inline - type: link - nodes: - - kind: inline - type: hashtag - nodes: - - kind: text - ranges: - - text: one +kind: state +document: + kind: document + nodes: + - kind: block + type: paragraph + nodes: + - kind: inline + type: link + nodes: + - kind: inline + type: hashtag + nodes: + - kind: text + ranges: + - kind: range + text: one + marks: [] diff --git a/test/serializers/fixtures/raw/deserialize/inline-with-data/input.yaml b/test/serializers/fixtures/raw/deserialize/inline-with-data/input.yaml index 92f4c8e21..948e108f1 100644 --- a/test/serializers/fixtures/raw/deserialize/inline-with-data/input.yaml +++ b/test/serializers/fixtures/raw/deserialize/inline-with-data/input.yaml @@ -1,13 +1,18 @@ -nodes: - - kind: block - type: paragraph - nodes: - - kind: inline - type: link - data: - key: value - nodes: - - kind: text - ranges: - - text: one +kind: state +document: + kind: document + nodes: + - kind: block + type: paragraph + nodes: + - kind: inline + type: link + data: + key: value + nodes: + - kind: text + ranges: + - kind: range + text: one + marks: [] diff --git a/test/serializers/fixtures/raw/deserialize/inline-with-is-void/input.yaml b/test/serializers/fixtures/raw/deserialize/inline-with-is-void/input.yaml index 13ee4a612..275e8390e 100644 --- a/test/serializers/fixtures/raw/deserialize/inline-with-is-void/input.yaml +++ b/test/serializers/fixtures/raw/deserialize/inline-with-is-void/input.yaml @@ -1,12 +1,17 @@ -nodes: - - kind: block - type: paragraph - nodes: - - kind: inline - type: link - isVoid: true - nodes: - - kind: text - ranges: - - text: one +kind: state +document: + kind: document + nodes: + - kind: block + type: paragraph + nodes: + - kind: inline + type: link + isVoid: true + nodes: + - kind: text + ranges: + - kind: range + text: one + marks: [] diff --git a/test/serializers/fixtures/raw/deserialize/inline/input.yaml b/test/serializers/fixtures/raw/deserialize/inline/input.yaml index 875b0c4b4..5fefb9202 100644 --- a/test/serializers/fixtures/raw/deserialize/inline/input.yaml +++ b/test/serializers/fixtures/raw/deserialize/inline/input.yaml @@ -1,11 +1,16 @@ -nodes: - - kind: block - type: paragraph - nodes: - - kind: inline - type: link - nodes: - - kind: text - ranges: - - text: one +kind: state +document: + kind: document + nodes: + - kind: block + type: paragraph + nodes: + - kind: inline + type: link + nodes: + - kind: text + ranges: + - kind: range + text: one + marks: [] diff --git a/test/serializers/fixtures/raw/deserialize/range-with-mark/input.yaml b/test/serializers/fixtures/raw/deserialize/range-with-mark/input.yaml index c852eea9d..045607106 100644 --- a/test/serializers/fixtures/raw/deserialize/range-with-mark/input.yaml +++ b/test/serializers/fixtures/raw/deserialize/range-with-mark/input.yaml @@ -1,12 +1,21 @@ -nodes: - - kind: block - type: paragraph - nodes: - - kind: text - ranges: - - text: o - - text: n - marks: - - type: bold - - text: e +kind: state +document: + kind: document + nodes: + - kind: block + type: paragraph + nodes: + - kind: text + ranges: + - kind: range + text: o + marks: [] + - kind: range + text: n + marks: + - kind: mark + type: bold + - kind: range + text: e + marks: [] diff --git a/test/serializers/fixtures/raw/serialize-terse/block-nested/input.js b/test/serializers/fixtures/raw/serialize-terse/block-nested/input.js new file mode 100644 index 000000000..3e88fa872 --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/block-nested/input.js @@ -0,0 +1,26 @@ + +import { Block, Character, Document, Inline, Mark, State, Text } from '../../../../../..' + +export default State.create({ + document: Document.create({ + nodes: Block.createList([ + { + type: 'quote', + nodes: Block.createList([ + { + type: 'paragraph', + nodes: Text.createList([ + { + characters: Character.createList([ + { text: 'o' }, + { text: 'n' }, + { text: 'e' } + ]) + } + ]) + } + ]) + } + ]) + }) +}) diff --git a/test/serializers/fixtures/raw/serialize-terse/block-nested/output.yaml b/test/serializers/fixtures/raw/serialize-terse/block-nested/output.yaml new file mode 100644 index 000000000..838fe74ab --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/block-nested/output.yaml @@ -0,0 +1,10 @@ + +nodes: + - kind: block + type: quote + nodes: + - kind: block + type: paragraph + nodes: + - kind: text + text: one diff --git a/test/serializers/fixtures/raw/serialize-terse/block-with-data/input.js b/test/serializers/fixtures/raw/serialize-terse/block-with-data/input.js new file mode 100644 index 000000000..837db3ff5 --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/block-with-data/input.js @@ -0,0 +1,22 @@ + +import { Block, Character, Document, Inline, Mark, State, Text } from '../../../../../..' + +export default State.create({ + document: Document.create({ + nodes: Block.createList([ + { + type: 'paragraph', + data: { key: 'value' }, + nodes: Text.createList([ + { + characters: Character.createList([ + { text: 'o' }, + { text: 'n' }, + { text: 'e' } + ]) + } + ]) + } + ]) + }) +}) diff --git a/test/serializers/fixtures/raw/serialize-terse/block-with-data/output.yaml b/test/serializers/fixtures/raw/serialize-terse/block-with-data/output.yaml new file mode 100644 index 000000000..9955eb0f5 --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/block-with-data/output.yaml @@ -0,0 +1,9 @@ + +nodes: + - kind: block + type: paragraph + data: + key: value + nodes: + - kind: text + text: one diff --git a/test/serializers/fixtures/raw/serialize-terse/block-with-is-void/input.js b/test/serializers/fixtures/raw/serialize-terse/block-with-is-void/input.js new file mode 100644 index 000000000..c2ca20cba --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/block-with-is-void/input.js @@ -0,0 +1,22 @@ + +import { Block, Character, Document, Inline, Mark, State, Text } from '../../../../../..' + +export default State.create({ + document: Document.create({ + nodes: Block.createList([ + { + type: 'paragraph', + isVoid: true, + nodes: Text.createList([ + { + characters: Character.createList([ + { text: 'o' }, + { text: 'n' }, + { text: 'e' } + ]) + } + ]) + } + ]) + }) +}) diff --git a/test/serializers/fixtures/raw/serialize-terse/block-with-is-void/output.yaml b/test/serializers/fixtures/raw/serialize-terse/block-with-is-void/output.yaml new file mode 100644 index 000000000..6ba72e6cd --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/block-with-is-void/output.yaml @@ -0,0 +1,5 @@ + +nodes: + - kind: block + type: paragraph + isVoid: true diff --git a/test/serializers/fixtures/raw/serialize-terse/block/input.js b/test/serializers/fixtures/raw/serialize-terse/block/input.js new file mode 100644 index 000000000..f4264b3b0 --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/block/input.js @@ -0,0 +1,21 @@ + +import { Block, Character, Document, Inline, Mark, State, Text } from '../../../../../..' + +export default State.create({ + document: Document.create({ + nodes: Block.createList([ + { + type: 'paragraph', + nodes: Text.createList([ + { + characters: Character.createList([ + { text: 'o' }, + { text: 'n' }, + { text: 'e' } + ]) + } + ]) + } + ]) + }) +}) diff --git a/test/serializers/fixtures/raw/serialize-terse/block/output.yaml b/test/serializers/fixtures/raw/serialize-terse/block/output.yaml new file mode 100644 index 000000000..3c2724d28 --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/block/output.yaml @@ -0,0 +1,7 @@ + +nodes: + - kind: block + type: paragraph + nodes: + - kind: text + text: one diff --git a/test/serializers/fixtures/raw/serialize-terse/character-with-mark/input.js b/test/serializers/fixtures/raw/serialize-terse/character-with-mark/input.js new file mode 100644 index 000000000..6f395da02 --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/character-with-mark/input.js @@ -0,0 +1,26 @@ + +import { Block, Character, Document, Inline, Mark, State, Text } from '../../../../../..' + +export default State.create({ + document: Document.create({ + nodes: Block.createList([ + { + type: 'paragraph', + nodes: Text.createList([ + { + characters: Character.createList([ + { + text: 'e', + marks: Mark.createSet([ + { + type: 'bold' + } + ]) + } + ]) + } + ]) + } + ]) + }) +}) diff --git a/test/serializers/fixtures/raw/serialize-terse/character-with-mark/output.yaml b/test/serializers/fixtures/raw/serialize-terse/character-with-mark/output.yaml new file mode 100644 index 000000000..9e3b597fd --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/character-with-mark/output.yaml @@ -0,0 +1,10 @@ + +nodes: + - kind: block + type: paragraph + nodes: + - kind: text + ranges: + - text: e + marks: + - type: bold diff --git a/test/serializers/fixtures/raw/serialize-terse/inline-nested/input.js b/test/serializers/fixtures/raw/serialize-terse/inline-nested/input.js new file mode 100644 index 000000000..b0b7477bb --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/inline-nested/input.js @@ -0,0 +1,31 @@ + +import { Block, Character, Document, Inline, Mark, State, Text } from '../../../../../..' + +export default State.create({ + document: Document.create({ + nodes: Block.createList([ + { + type: 'paragraph', + nodes: Inline.createList([ + { + type: 'link', + nodes: Inline.createList([ + { + type: 'hashtag', + nodes: Text.createList([ + { + characters: Character.createList([ + { text: 'o' }, + { text: 'n' }, + { text: 'e' } + ]) + } + ]) + } + ]) + } + ]) + } + ]) + }) +}) diff --git a/test/serializers/fixtures/raw/serialize-terse/inline-nested/output.yaml b/test/serializers/fixtures/raw/serialize-terse/inline-nested/output.yaml new file mode 100644 index 000000000..0f607dd81 --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/inline-nested/output.yaml @@ -0,0 +1,13 @@ + +nodes: + - kind: block + type: paragraph + nodes: + - kind: inline + type: link + nodes: + - kind: inline + type: hashtag + nodes: + - kind: text + text: one diff --git a/test/serializers/fixtures/raw/serialize-terse/inline-with-data/input.js b/test/serializers/fixtures/raw/serialize-terse/inline-with-data/input.js new file mode 100644 index 000000000..f820cc7eb --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/inline-with-data/input.js @@ -0,0 +1,27 @@ + +import { Block, Character, Document, Inline, Mark, State, Text } from '../../../../../..' + +export default State.create({ + document: Document.create({ + nodes: Block.createList([ + { + type: 'paragraph', + nodes: Inline.createList([ + { + type: 'link', + data: { key: 'value' }, + nodes: Text.createList([ + { + characters: Character.createList([ + { text: 'o' }, + { text: 'n' }, + { text: 'e' } + ]) + } + ]) + } + ]) + } + ]) + }) +}) diff --git a/test/serializers/fixtures/raw/serialize-terse/inline-with-data/output.yaml b/test/serializers/fixtures/raw/serialize-terse/inline-with-data/output.yaml new file mode 100644 index 000000000..77c193787 --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/inline-with-data/output.yaml @@ -0,0 +1,12 @@ + +nodes: + - kind: block + type: paragraph + nodes: + - kind: inline + type: link + data: + key: value + nodes: + - kind: text + text: one diff --git a/test/serializers/fixtures/raw/serialize-terse/inline-with-is-void/input.js b/test/serializers/fixtures/raw/serialize-terse/inline-with-is-void/input.js new file mode 100644 index 000000000..883cbd4e1 --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/inline-with-is-void/input.js @@ -0,0 +1,27 @@ + +import { Block, Character, Document, Inline, Mark, State, Text } from '../../../../../..' + +export default State.create({ + document: Document.create({ + nodes: Block.createList([ + { + type: 'paragraph', + nodes: Inline.createList([ + { + type: 'link', + isVoid: true, + nodes: Text.createList([ + { + characters: Character.createList([ + { text: 'o' }, + { text: 'n' }, + { text: 'e' } + ]) + } + ]) + } + ]) + } + ]) + }) +}) diff --git a/test/serializers/fixtures/raw/serialize-terse/inline-with-is-void/output.yaml b/test/serializers/fixtures/raw/serialize-terse/inline-with-is-void/output.yaml new file mode 100644 index 000000000..7a85c63e4 --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/inline-with-is-void/output.yaml @@ -0,0 +1,8 @@ + +nodes: + - kind: block + type: paragraph + nodes: + - kind: inline + type: link + isVoid: true diff --git a/test/serializers/fixtures/raw/serialize-terse/inline/input.js b/test/serializers/fixtures/raw/serialize-terse/inline/input.js new file mode 100644 index 000000000..ed3cf91e2 --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/inline/input.js @@ -0,0 +1,26 @@ + +import { Block, Character, Document, Inline, Mark, State, Text } from '../../../../../..' + +export default State.create({ + document: Document.create({ + nodes: Block.createList([ + { + type: 'paragraph', + nodes: Inline.createList([ + { + type: 'link', + nodes: Text.createList([ + { + characters: Character.createList([ + { text: 'o' }, + { text: 'n' }, + { text: 'e' } + ]) + } + ]) + } + ]) + } + ]) + }) +}) diff --git a/test/serializers/fixtures/raw/serialize-terse/inline/output.yaml b/test/serializers/fixtures/raw/serialize-terse/inline/output.yaml new file mode 100644 index 000000000..2ab734df3 --- /dev/null +++ b/test/serializers/fixtures/raw/serialize-terse/inline/output.yaml @@ -0,0 +1,10 @@ + +nodes: + - kind: block + type: paragraph + nodes: + - kind: inline + type: link + nodes: + - kind: text + text: one diff --git a/test/serializers/fixtures/raw/serialize/block-nested/output.yaml b/test/serializers/fixtures/raw/serialize/block-nested/output.yaml index aba50d05d..3b074e954 100644 --- a/test/serializers/fixtures/raw/serialize/block-nested/output.yaml +++ b/test/serializers/fixtures/raw/serialize/block-nested/output.yaml @@ -1,11 +1,20 @@ -nodes: - - kind: block - type: quote - nodes: - - kind: block - type: paragraph - nodes: - - kind: text - ranges: - - text: one +kind: state +document: + kind: document + nodes: + - kind: block + type: quote + data: {} + isVoid: false + nodes: + - kind: block + type: paragraph + data: {} + isVoid: false + nodes: + - kind: text + ranges: + - kind: range + text: one + marks: [] diff --git a/test/serializers/fixtures/raw/serialize/block-with-data/output.yaml b/test/serializers/fixtures/raw/serialize/block-with-data/output.yaml index 1100f59c1..3333ee919 100644 --- a/test/serializers/fixtures/raw/serialize/block-with-data/output.yaml +++ b/test/serializers/fixtures/raw/serialize/block-with-data/output.yaml @@ -1,10 +1,16 @@ -nodes: - - kind: block - type: paragraph - data: - key: value - nodes: - - kind: text - ranges: - - text: one +kind: state +document: + kind: document + nodes: + - kind: block + type: paragraph + isVoid: false + data: + key: value + nodes: + - kind: text + ranges: + - kind: range + text: one + marks: [] diff --git a/test/serializers/fixtures/raw/serialize/block-with-is-void/output.yaml b/test/serializers/fixtures/raw/serialize/block-with-is-void/output.yaml index 52255964e..5cf46203f 100644 --- a/test/serializers/fixtures/raw/serialize/block-with-is-void/output.yaml +++ b/test/serializers/fixtures/raw/serialize/block-with-is-void/output.yaml @@ -1,9 +1,15 @@ -nodes: - - kind: block - type: paragraph - isVoid: true - nodes: - - kind: text - ranges: - - text: "" +kind: state +document: + kind: document + nodes: + - kind: block + type: paragraph + data: {} + isVoid: true + nodes: + - kind: text + ranges: + - kind: range + text: "" + marks: [] diff --git a/test/serializers/fixtures/raw/serialize/block/output.yaml b/test/serializers/fixtures/raw/serialize/block/output.yaml index a9bf9ed14..d4319d176 100644 --- a/test/serializers/fixtures/raw/serialize/block/output.yaml +++ b/test/serializers/fixtures/raw/serialize/block/output.yaml @@ -1,8 +1,15 @@ -nodes: - - kind: block - type: paragraph - nodes: - - kind: text - ranges: - - text: one +kind: state +document: + kind: document + nodes: + - kind: block + type: paragraph + data: {} + isVoid: false + nodes: + - kind: text + ranges: + - kind: range + text: one + marks: [] diff --git a/test/serializers/fixtures/raw/serialize/character-with-mark/output.yaml b/test/serializers/fixtures/raw/serialize/character-with-mark/output.yaml index 0f7aeffbd..951dce31c 100644 --- a/test/serializers/fixtures/raw/serialize/character-with-mark/output.yaml +++ b/test/serializers/fixtures/raw/serialize/character-with-mark/output.yaml @@ -1,11 +1,21 @@ -nodes: - - kind: block - type: paragraph - nodes: - - kind: text - ranges: - - text: "on" - - text: e - marks: - - type: bold +kind: state +document: + kind: document + nodes: + - kind: block + type: paragraph + data: {} + isVoid: false + nodes: + - kind: text + ranges: + - kind: range + text: "on" + marks: [] + - kind: range + text: e + marks: + - kind: mark + type: bold + data: {} diff --git a/test/serializers/fixtures/raw/serialize/inline-nested/output.yaml b/test/serializers/fixtures/raw/serialize/inline-nested/output.yaml index edab6c050..414ac45c2 100644 --- a/test/serializers/fixtures/raw/serialize/inline-nested/output.yaml +++ b/test/serializers/fixtures/raw/serialize/inline-nested/output.yaml @@ -1,14 +1,25 @@ -nodes: - - kind: block - type: paragraph - nodes: - - kind: inline - type: link - nodes: - - kind: inline - type: hashtag - nodes: - - kind: text - ranges: - - text: one +kind: state +document: + kind: document + nodes: + - kind: block + type: paragraph + data: {} + isVoid: false + nodes: + - kind: inline + type: link + data: {} + isVoid: false + nodes: + - kind: inline + type: hashtag + data: {} + isVoid: false + nodes: + - kind: text + ranges: + - kind: range + text: one + marks: [] diff --git a/test/serializers/fixtures/raw/serialize/inline-with-data/output.yaml b/test/serializers/fixtures/raw/serialize/inline-with-data/output.yaml index 92f4c8e21..33e101f58 100644 --- a/test/serializers/fixtures/raw/serialize/inline-with-data/output.yaml +++ b/test/serializers/fixtures/raw/serialize/inline-with-data/output.yaml @@ -1,13 +1,21 @@ -nodes: - - kind: block - type: paragraph - nodes: - - kind: inline - type: link - data: - key: value - nodes: - - kind: text - ranges: - - text: one +kind: state +document: + kind: document + nodes: + - kind: block + type: paragraph + data: {} + isVoid: false + nodes: + - kind: inline + type: link + isVoid: false + data: + key: value + nodes: + - kind: text + ranges: + - kind: range + text: one + marks: [] diff --git a/test/serializers/fixtures/raw/serialize/inline-with-is-void/output.yaml b/test/serializers/fixtures/raw/serialize/inline-with-is-void/output.yaml index 9234feb75..7419d2ae2 100644 --- a/test/serializers/fixtures/raw/serialize/inline-with-is-void/output.yaml +++ b/test/serializers/fixtures/raw/serialize/inline-with-is-void/output.yaml @@ -1,12 +1,20 @@ -nodes: - - kind: block - type: paragraph - nodes: - - kind: inline - type: link - isVoid: true - nodes: - - kind: text - ranges: - - text: "" +kind: state +document: + kind: document + nodes: + - kind: block + type: paragraph + data: {} + isVoid: false + nodes: + - kind: inline + type: link + isVoid: true + data: {} + nodes: + - kind: text + ranges: + - kind: range + text: "" + marks: [] diff --git a/test/serializers/fixtures/raw/serialize/inline/output.yaml b/test/serializers/fixtures/raw/serialize/inline/output.yaml index 875b0c4b4..6db60eaed 100644 --- a/test/serializers/fixtures/raw/serialize/inline/output.yaml +++ b/test/serializers/fixtures/raw/serialize/inline/output.yaml @@ -1,11 +1,20 @@ -nodes: - - kind: block - type: paragraph - nodes: - - kind: inline - type: link - nodes: - - kind: text - ranges: - - text: one +kind: state +document: + kind: document + nodes: + - kind: block + type: paragraph + data: {} + isVoid: false + nodes: + - kind: inline + type: link + data: {} + isVoid: false + nodes: + - kind: text + ranges: + - kind: range + text: one + marks: [] diff --git a/test/serializers/index.js b/test/serializers/index.js index 2b89b0461..b083fbacd 100644 --- a/test/serializers/index.js +++ b/test/serializers/index.js @@ -3,7 +3,7 @@ import assert from 'assert' import fs from 'fs' import readMetadata from 'read-metadata' import strip from '../helpers/strip-dynamic' -import { Html, Plain, Raw } from '../..' +import { Html, Json, Plain, Raw } from '../..' import { equal, strictEqual } from '../helpers/assert-json' import { resolve } from 'path' @@ -47,6 +47,9 @@ describe('serializers', () => { }) }) + describe('json', () => { + }) + describe('plain', () => { describe('deserialize()', () => { const dir = resolve(__dirname, './fixtures/plain/deserialize') @@ -107,6 +110,38 @@ describe('serializers', () => { const input = require(resolve(innerDir, 'input.js')).default const expected = readMetadata.sync(resolve(innerDir, 'output.yaml')) const serialized = Raw.serialize(input) + serialized.document = strip(serialized.document) + strictEqual(serialized, expected) + }) + } + }) + + describe('deserialize({ terse: true })', () => { + const dir = resolve(__dirname, './fixtures/raw/deserialize-terse') + const tests = fs.readdirSync(dir) + + for (const test of tests) { + it(test, () => { + const innerDir = resolve(dir, test) + const expected = readMetadata.sync(resolve(innerDir, 'output.yaml')) + const input = readMetadata.sync(resolve(innerDir, 'input.yaml')) + const state = Raw.deserialize(input, { terse: true }) + const json = state.document.toJS() + strictEqual(strip(json), expected) + }) + } + }) + + describe('serialize({ terse: true })', () => { + const dir = resolve(__dirname, './fixtures/raw/serialize-terse') + const tests = fs.readdirSync(dir) + + for (const test of tests) { + it(test, () => { + const innerDir = resolve(dir, test) + const input = require(resolve(innerDir, 'input.js')).default + const expected = readMetadata.sync(resolve(innerDir, 'output.yaml')) + const serialized = Raw.serialize(input, { terse: true }) strictEqual(strip(serialized), expected) }) } diff --git a/test/transforms/fixtures/add-mark-at-range/across-blocks/input.yaml b/test/transforms/fixtures/add-mark-at-range/across-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/add-mark-at-range/across-blocks/input.yaml +++ b/test/transforms/fixtures/add-mark-at-range/across-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/add-mark-at-range/across-inlines/input.yaml b/test/transforms/fixtures/add-mark-at-range/across-inlines/input.yaml index c31f583e3..2568c6b66 100644 --- a/test/transforms/fixtures/add-mark-at-range/across-inlines/input.yaml +++ b/test/transforms/fixtures/add-mark-at-range/across-inlines/input.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/add-mark-at-range/first-character/input.yaml b/test/transforms/fixtures/add-mark-at-range/first-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/add-mark-at-range/first-character/input.yaml +++ b/test/transforms/fixtures/add-mark-at-range/first-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/add-mark-at-range/last-character/input.yaml b/test/transforms/fixtures/add-mark-at-range/last-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/add-mark-at-range/last-character/input.yaml +++ b/test/transforms/fixtures/add-mark-at-range/last-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/add-mark-at-range/middle-character/input.yaml b/test/transforms/fixtures/add-mark-at-range/middle-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/add-mark-at-range/middle-character/input.yaml +++ b/test/transforms/fixtures/add-mark-at-range/middle-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/add-mark-at-range/whole-word/input.yaml b/test/transforms/fixtures/add-mark-at-range/whole-word/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/add-mark-at-range/whole-word/input.yaml +++ b/test/transforms/fixtures/add-mark-at-range/whole-word/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/add-mark-at-range/with-mark-object/input.yaml b/test/transforms/fixtures/add-mark-at-range/with-mark-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/add-mark-at-range/with-mark-object/input.yaml +++ b/test/transforms/fixtures/add-mark-at-range/with-mark-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/add-mark-at-range/with-plain-object/input.yaml b/test/transforms/fixtures/add-mark-at-range/with-plain-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/add-mark-at-range/with-plain-object/input.yaml +++ b/test/transforms/fixtures/add-mark-at-range/with-plain-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/add-mark/across-blocks/input.yaml b/test/transforms/fixtures/add-mark/across-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/add-mark/across-blocks/input.yaml +++ b/test/transforms/fixtures/add-mark/across-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/add-mark/across-inlines/input.yaml b/test/transforms/fixtures/add-mark/across-inlines/input.yaml index c31f583e3..2568c6b66 100644 --- a/test/transforms/fixtures/add-mark/across-inlines/input.yaml +++ b/test/transforms/fixtures/add-mark/across-inlines/input.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/add-mark/collapsed-selection/input.yaml b/test/transforms/fixtures/add-mark/collapsed-selection/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/add-mark/collapsed-selection/input.yaml +++ b/test/transforms/fixtures/add-mark/collapsed-selection/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/add-mark/first-character/input.yaml b/test/transforms/fixtures/add-mark/first-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/add-mark/first-character/input.yaml +++ b/test/transforms/fixtures/add-mark/first-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/add-mark/last-character/input.yaml b/test/transforms/fixtures/add-mark/last-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/add-mark/last-character/input.yaml +++ b/test/transforms/fixtures/add-mark/last-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/add-mark/middle-character/input.yaml b/test/transforms/fixtures/add-mark/middle-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/add-mark/middle-character/input.yaml +++ b/test/transforms/fixtures/add-mark/middle-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/add-mark/whole-word/input.yaml b/test/transforms/fixtures/add-mark/whole-word/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/add-mark/whole-word/input.yaml +++ b/test/transforms/fixtures/add-mark/whole-word/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/add-mark/with-mark-object/input.yaml b/test/transforms/fixtures/add-mark/with-mark-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/add-mark/with-mark-object/input.yaml +++ b/test/transforms/fixtures/add-mark/with-mark-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/add-mark/with-plain-object/input.yaml b/test/transforms/fixtures/add-mark/with-plain-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/add-mark/with-plain-object/input.yaml +++ b/test/transforms/fixtures/add-mark/with-plain-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-at-range/across-blocks-inlines/input.yaml b/test/transforms/fixtures/delete-at-range/across-blocks-inlines/input.yaml index c31f583e3..2568c6b66 100644 --- a/test/transforms/fixtures/delete-at-range/across-blocks-inlines/input.yaml +++ b/test/transforms/fixtures/delete-at-range/across-blocks-inlines/input.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/delete-at-range/across-blocks-inlines/output.yaml b/test/transforms/fixtures/delete-at-range/across-blocks-inlines/output.yaml index eddbfe382..bb1a8c475 100644 --- a/test/transforms/fixtures/delete-at-range/across-blocks-inlines/output.yaml +++ b/test/transforms/fixtures/delete-at-range/across-blocks-inlines/output.yaml @@ -7,11 +7,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: link nodes: - kind: text - ranges: - - text: other + text: other diff --git a/test/transforms/fixtures/delete-at-range/first-character/input.yaml b/test/transforms/fixtures/delete-at-range/first-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-at-range/first-character/input.yaml +++ b/test/transforms/fixtures/delete-at-range/first-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-at-range/first-character/output.yaml b/test/transforms/fixtures/delete-at-range/first-character/output.yaml index 9414f68ce..13a26e096 100644 --- a/test/transforms/fixtures/delete-at-range/first-character/output.yaml +++ b/test/transforms/fixtures/delete-at-range/first-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: ord + text: ord diff --git a/test/transforms/fixtures/delete-at-range/join-blocks-and-trim/input.yaml b/test/transforms/fixtures/delete-at-range/join-blocks-and-trim/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/delete-at-range/join-blocks-and-trim/input.yaml +++ b/test/transforms/fixtures/delete-at-range/join-blocks-and-trim/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/delete-at-range/join-blocks-and-trim/output.yaml b/test/transforms/fixtures/delete-at-range/join-blocks-and-trim/output.yaml index 0a088f236..64b242e25 100644 --- a/test/transforms/fixtures/delete-at-range/join-blocks-and-trim/output.yaml +++ b/test/transforms/fixtures/delete-at-range/join-blocks-and-trim/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: woother + text: woother diff --git a/test/transforms/fixtures/delete-at-range/join-blocks/input.yaml b/test/transforms/fixtures/delete-at-range/join-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/delete-at-range/join-blocks/input.yaml +++ b/test/transforms/fixtures/delete-at-range/join-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/delete-at-range/join-blocks/output.yaml b/test/transforms/fixtures/delete-at-range/join-blocks/output.yaml index 3d5aad120..ef8246e52 100644 --- a/test/transforms/fixtures/delete-at-range/join-blocks/output.yaml +++ b/test/transforms/fixtures/delete-at-range/join-blocks/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wordanother + text: wordanother diff --git a/test/transforms/fixtures/delete-at-range/last-character/input.yaml b/test/transforms/fixtures/delete-at-range/last-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-at-range/last-character/input.yaml +++ b/test/transforms/fixtures/delete-at-range/last-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-at-range/last-character/output.yaml b/test/transforms/fixtures/delete-at-range/last-character/output.yaml index 870bf02c6..2ee7c9598 100644 --- a/test/transforms/fixtures/delete-at-range/last-character/output.yaml +++ b/test/transforms/fixtures/delete-at-range/last-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wor + text: wor diff --git a/test/transforms/fixtures/delete-at-range/middle-character/input.yaml b/test/transforms/fixtures/delete-at-range/middle-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-at-range/middle-character/input.yaml +++ b/test/transforms/fixtures/delete-at-range/middle-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-at-range/middle-character/output.yaml b/test/transforms/fixtures/delete-at-range/middle-character/output.yaml index b82be33b4..01b01acfe 100644 --- a/test/transforms/fixtures/delete-at-range/middle-character/output.yaml +++ b/test/transforms/fixtures/delete-at-range/middle-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wrd + text: wrd diff --git a/test/transforms/fixtures/delete-at-range/nested-block/input.yaml b/test/transforms/fixtures/delete-at-range/nested-block/input.yaml index d9219034b..cc326eae0 100644 --- a/test/transforms/fixtures/delete-at-range/nested-block/input.yaml +++ b/test/transforms/fixtures/delete-at-range/nested-block/input.yaml @@ -4,8 +4,7 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -13,11 +12,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: middle + text: middle - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/delete-at-range/nested-block/output.yaml b/test/transforms/fixtures/delete-at-range/nested-block/output.yaml index 0a088f236..64b242e25 100644 --- a/test/transforms/fixtures/delete-at-range/nested-block/output.yaml +++ b/test/transforms/fixtures/delete-at-range/nested-block/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: woother + text: woother diff --git a/test/transforms/fixtures/delete-at-range/whole-word/input.yaml b/test/transforms/fixtures/delete-at-range/whole-word/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-at-range/whole-word/input.yaml +++ b/test/transforms/fixtures/delete-at-range/whole-word/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-at-range/whole-word/output.yaml b/test/transforms/fixtures/delete-at-range/whole-word/output.yaml index a1bc55c38..f6de4d08a 100644 --- a/test/transforms/fixtures/delete-at-range/whole-word/output.yaml +++ b/test/transforms/fixtures/delete-at-range/whole-word/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/delete-backward-at-range/first-character/input.yaml b/test/transforms/fixtures/delete-backward-at-range/first-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-backward-at-range/first-character/input.yaml +++ b/test/transforms/fixtures/delete-backward-at-range/first-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-backward-at-range/first-character/output.yaml b/test/transforms/fixtures/delete-backward-at-range/first-character/output.yaml index 9414f68ce..13a26e096 100644 --- a/test/transforms/fixtures/delete-backward-at-range/first-character/output.yaml +++ b/test/transforms/fixtures/delete-backward-at-range/first-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: ord + text: ord diff --git a/test/transforms/fixtures/delete-backward-at-range/join-blocks/input.yaml b/test/transforms/fixtures/delete-backward-at-range/join-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/delete-backward-at-range/join-blocks/input.yaml +++ b/test/transforms/fixtures/delete-backward-at-range/join-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/delete-backward-at-range/join-blocks/output.yaml b/test/transforms/fixtures/delete-backward-at-range/join-blocks/output.yaml index 3d5aad120..ef8246e52 100644 --- a/test/transforms/fixtures/delete-backward-at-range/join-blocks/output.yaml +++ b/test/transforms/fixtures/delete-backward-at-range/join-blocks/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wordanother + text: wordanother diff --git a/test/transforms/fixtures/delete-backward-at-range/join-nested-blocks/input.yaml b/test/transforms/fixtures/delete-backward-at-range/join-nested-blocks/input.yaml index 87b381f13..639ef09f0 100644 --- a/test/transforms/fixtures/delete-backward-at-range/join-nested-blocks/input.yaml +++ b/test/transforms/fixtures/delete-backward-at-range/join-nested-blocks/input.yaml @@ -7,11 +7,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/delete-backward-at-range/join-nested-blocks/output.yaml b/test/transforms/fixtures/delete-backward-at-range/join-nested-blocks/output.yaml index 45d48e74b..dc8afcd2f 100644 --- a/test/transforms/fixtures/delete-backward-at-range/join-nested-blocks/output.yaml +++ b/test/transforms/fixtures/delete-backward-at-range/join-nested-blocks/output.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wordanother + text: wordanother diff --git a/test/transforms/fixtures/delete-backward-at-range/last-character/input.yaml b/test/transforms/fixtures/delete-backward-at-range/last-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-backward-at-range/last-character/input.yaml +++ b/test/transforms/fixtures/delete-backward-at-range/last-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-backward-at-range/last-character/output.yaml b/test/transforms/fixtures/delete-backward-at-range/last-character/output.yaml index 870bf02c6..2ee7c9598 100644 --- a/test/transforms/fixtures/delete-backward-at-range/last-character/output.yaml +++ b/test/transforms/fixtures/delete-backward-at-range/last-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wor + text: wor diff --git a/test/transforms/fixtures/delete-backward-at-range/middle-character/input.yaml b/test/transforms/fixtures/delete-backward-at-range/middle-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-backward-at-range/middle-character/input.yaml +++ b/test/transforms/fixtures/delete-backward-at-range/middle-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-backward-at-range/middle-character/output.yaml b/test/transforms/fixtures/delete-backward-at-range/middle-character/output.yaml index b82be33b4..01b01acfe 100644 --- a/test/transforms/fixtures/delete-backward-at-range/middle-character/output.yaml +++ b/test/transforms/fixtures/delete-backward-at-range/middle-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wrd + text: wrd diff --git a/test/transforms/fixtures/delete-backward-at-range/start-of-document/input.yaml b/test/transforms/fixtures/delete-backward-at-range/start-of-document/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-backward-at-range/start-of-document/input.yaml +++ b/test/transforms/fixtures/delete-backward-at-range/start-of-document/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-backward-at-range/start-of-document/output.yaml b/test/transforms/fixtures/delete-backward-at-range/start-of-document/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-backward-at-range/start-of-document/output.yaml +++ b/test/transforms/fixtures/delete-backward-at-range/start-of-document/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-backward/first-character/input.yaml b/test/transforms/fixtures/delete-backward/first-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-backward/first-character/input.yaml +++ b/test/transforms/fixtures/delete-backward/first-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-backward/first-character/output.yaml b/test/transforms/fixtures/delete-backward/first-character/output.yaml index 9414f68ce..13a26e096 100644 --- a/test/transforms/fixtures/delete-backward/first-character/output.yaml +++ b/test/transforms/fixtures/delete-backward/first-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: ord + text: ord diff --git a/test/transforms/fixtures/delete-backward/join-blocks/input.yaml b/test/transforms/fixtures/delete-backward/join-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/delete-backward/join-blocks/input.yaml +++ b/test/transforms/fixtures/delete-backward/join-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/delete-backward/join-blocks/output.yaml b/test/transforms/fixtures/delete-backward/join-blocks/output.yaml index 3d5aad120..ef8246e52 100644 --- a/test/transforms/fixtures/delete-backward/join-blocks/output.yaml +++ b/test/transforms/fixtures/delete-backward/join-blocks/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wordanother + text: wordanother diff --git a/test/transforms/fixtures/delete-backward/join-nested-blocks/input.yaml b/test/transforms/fixtures/delete-backward/join-nested-blocks/input.yaml index 87b381f13..639ef09f0 100644 --- a/test/transforms/fixtures/delete-backward/join-nested-blocks/input.yaml +++ b/test/transforms/fixtures/delete-backward/join-nested-blocks/input.yaml @@ -7,11 +7,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/delete-backward/join-nested-blocks/output.yaml b/test/transforms/fixtures/delete-backward/join-nested-blocks/output.yaml index 45d48e74b..dc8afcd2f 100644 --- a/test/transforms/fixtures/delete-backward/join-nested-blocks/output.yaml +++ b/test/transforms/fixtures/delete-backward/join-nested-blocks/output.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wordanother + text: wordanother diff --git a/test/transforms/fixtures/delete-backward/last-character/input.yaml b/test/transforms/fixtures/delete-backward/last-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-backward/last-character/input.yaml +++ b/test/transforms/fixtures/delete-backward/last-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-backward/last-character/output.yaml b/test/transforms/fixtures/delete-backward/last-character/output.yaml index 870bf02c6..2ee7c9598 100644 --- a/test/transforms/fixtures/delete-backward/last-character/output.yaml +++ b/test/transforms/fixtures/delete-backward/last-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wor + text: wor diff --git a/test/transforms/fixtures/delete-backward/middle-character/input.yaml b/test/transforms/fixtures/delete-backward/middle-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-backward/middle-character/input.yaml +++ b/test/transforms/fixtures/delete-backward/middle-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-backward/middle-character/output.yaml b/test/transforms/fixtures/delete-backward/middle-character/output.yaml index b82be33b4..01b01acfe 100644 --- a/test/transforms/fixtures/delete-backward/middle-character/output.yaml +++ b/test/transforms/fixtures/delete-backward/middle-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wrd + text: wrd diff --git a/test/transforms/fixtures/delete-backward/start-of-document/input.yaml b/test/transforms/fixtures/delete-backward/start-of-document/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-backward/start-of-document/input.yaml +++ b/test/transforms/fixtures/delete-backward/start-of-document/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-backward/start-of-document/output.yaml b/test/transforms/fixtures/delete-backward/start-of-document/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-backward/start-of-document/output.yaml +++ b/test/transforms/fixtures/delete-backward/start-of-document/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-forward-at-range/end-of-document/input.yaml b/test/transforms/fixtures/delete-forward-at-range/end-of-document/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-forward-at-range/end-of-document/input.yaml +++ b/test/transforms/fixtures/delete-forward-at-range/end-of-document/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-forward-at-range/end-of-document/output.yaml b/test/transforms/fixtures/delete-forward-at-range/end-of-document/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-forward-at-range/end-of-document/output.yaml +++ b/test/transforms/fixtures/delete-forward-at-range/end-of-document/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-forward-at-range/first-character/input.yaml b/test/transforms/fixtures/delete-forward-at-range/first-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-forward-at-range/first-character/input.yaml +++ b/test/transforms/fixtures/delete-forward-at-range/first-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-forward-at-range/first-character/output.yaml b/test/transforms/fixtures/delete-forward-at-range/first-character/output.yaml index 9414f68ce..13a26e096 100644 --- a/test/transforms/fixtures/delete-forward-at-range/first-character/output.yaml +++ b/test/transforms/fixtures/delete-forward-at-range/first-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: ord + text: ord diff --git a/test/transforms/fixtures/delete-forward-at-range/join-blocks/input.yaml b/test/transforms/fixtures/delete-forward-at-range/join-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/delete-forward-at-range/join-blocks/input.yaml +++ b/test/transforms/fixtures/delete-forward-at-range/join-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/delete-forward-at-range/join-blocks/output.yaml b/test/transforms/fixtures/delete-forward-at-range/join-blocks/output.yaml index 3d5aad120..ef8246e52 100644 --- a/test/transforms/fixtures/delete-forward-at-range/join-blocks/output.yaml +++ b/test/transforms/fixtures/delete-forward-at-range/join-blocks/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wordanother + text: wordanother diff --git a/test/transforms/fixtures/delete-forward-at-range/join-nested-blocks/input.yaml b/test/transforms/fixtures/delete-forward-at-range/join-nested-blocks/input.yaml index 87b381f13..639ef09f0 100644 --- a/test/transforms/fixtures/delete-forward-at-range/join-nested-blocks/input.yaml +++ b/test/transforms/fixtures/delete-forward-at-range/join-nested-blocks/input.yaml @@ -7,11 +7,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/delete-forward-at-range/join-nested-blocks/output.yaml b/test/transforms/fixtures/delete-forward-at-range/join-nested-blocks/output.yaml index 45d48e74b..dc8afcd2f 100644 --- a/test/transforms/fixtures/delete-forward-at-range/join-nested-blocks/output.yaml +++ b/test/transforms/fixtures/delete-forward-at-range/join-nested-blocks/output.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wordanother + text: wordanother diff --git a/test/transforms/fixtures/delete-forward-at-range/last-character/input.yaml b/test/transforms/fixtures/delete-forward-at-range/last-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-forward-at-range/last-character/input.yaml +++ b/test/transforms/fixtures/delete-forward-at-range/last-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-forward-at-range/last-character/output.yaml b/test/transforms/fixtures/delete-forward-at-range/last-character/output.yaml index 870bf02c6..2ee7c9598 100644 --- a/test/transforms/fixtures/delete-forward-at-range/last-character/output.yaml +++ b/test/transforms/fixtures/delete-forward-at-range/last-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wor + text: wor diff --git a/test/transforms/fixtures/delete-forward-at-range/middle-character/input.yaml b/test/transforms/fixtures/delete-forward-at-range/middle-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-forward-at-range/middle-character/input.yaml +++ b/test/transforms/fixtures/delete-forward-at-range/middle-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-forward-at-range/middle-character/output.yaml b/test/transforms/fixtures/delete-forward-at-range/middle-character/output.yaml index b82be33b4..01b01acfe 100644 --- a/test/transforms/fixtures/delete-forward-at-range/middle-character/output.yaml +++ b/test/transforms/fixtures/delete-forward-at-range/middle-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wrd + text: wrd diff --git a/test/transforms/fixtures/delete-forward/end-of-document/input.yaml b/test/transforms/fixtures/delete-forward/end-of-document/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-forward/end-of-document/input.yaml +++ b/test/transforms/fixtures/delete-forward/end-of-document/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-forward/end-of-document/output.yaml b/test/transforms/fixtures/delete-forward/end-of-document/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-forward/end-of-document/output.yaml +++ b/test/transforms/fixtures/delete-forward/end-of-document/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-forward/first-character/input.yaml b/test/transforms/fixtures/delete-forward/first-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-forward/first-character/input.yaml +++ b/test/transforms/fixtures/delete-forward/first-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-forward/first-character/output.yaml b/test/transforms/fixtures/delete-forward/first-character/output.yaml index 9414f68ce..13a26e096 100644 --- a/test/transforms/fixtures/delete-forward/first-character/output.yaml +++ b/test/transforms/fixtures/delete-forward/first-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: ord + text: ord diff --git a/test/transforms/fixtures/delete-forward/join-blocks/input.yaml b/test/transforms/fixtures/delete-forward/join-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/delete-forward/join-blocks/input.yaml +++ b/test/transforms/fixtures/delete-forward/join-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/delete-forward/join-blocks/output.yaml b/test/transforms/fixtures/delete-forward/join-blocks/output.yaml index 3d5aad120..ef8246e52 100644 --- a/test/transforms/fixtures/delete-forward/join-blocks/output.yaml +++ b/test/transforms/fixtures/delete-forward/join-blocks/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wordanother + text: wordanother diff --git a/test/transforms/fixtures/delete-forward/join-nested-blocks/input.yaml b/test/transforms/fixtures/delete-forward/join-nested-blocks/input.yaml index 87b381f13..639ef09f0 100644 --- a/test/transforms/fixtures/delete-forward/join-nested-blocks/input.yaml +++ b/test/transforms/fixtures/delete-forward/join-nested-blocks/input.yaml @@ -7,11 +7,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/delete-forward/join-nested-blocks/output.yaml b/test/transforms/fixtures/delete-forward/join-nested-blocks/output.yaml index 45d48e74b..dc8afcd2f 100644 --- a/test/transforms/fixtures/delete-forward/join-nested-blocks/output.yaml +++ b/test/transforms/fixtures/delete-forward/join-nested-blocks/output.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wordanother + text: wordanother diff --git a/test/transforms/fixtures/delete-forward/last-character/input.yaml b/test/transforms/fixtures/delete-forward/last-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-forward/last-character/input.yaml +++ b/test/transforms/fixtures/delete-forward/last-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-forward/last-character/output.yaml b/test/transforms/fixtures/delete-forward/last-character/output.yaml index 870bf02c6..2ee7c9598 100644 --- a/test/transforms/fixtures/delete-forward/last-character/output.yaml +++ b/test/transforms/fixtures/delete-forward/last-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wor + text: wor diff --git a/test/transforms/fixtures/delete-forward/middle-character/input.yaml b/test/transforms/fixtures/delete-forward/middle-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete-forward/middle-character/input.yaml +++ b/test/transforms/fixtures/delete-forward/middle-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete-forward/middle-character/output.yaml b/test/transforms/fixtures/delete-forward/middle-character/output.yaml index b82be33b4..01b01acfe 100644 --- a/test/transforms/fixtures/delete-forward/middle-character/output.yaml +++ b/test/transforms/fixtures/delete-forward/middle-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wrd + text: wrd diff --git a/test/transforms/fixtures/delete/across-blocks-inlines/input.yaml b/test/transforms/fixtures/delete/across-blocks-inlines/input.yaml index c31f583e3..2568c6b66 100644 --- a/test/transforms/fixtures/delete/across-blocks-inlines/input.yaml +++ b/test/transforms/fixtures/delete/across-blocks-inlines/input.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/delete/across-blocks-inlines/output.yaml b/test/transforms/fixtures/delete/across-blocks-inlines/output.yaml index eddbfe382..bb1a8c475 100644 --- a/test/transforms/fixtures/delete/across-blocks-inlines/output.yaml +++ b/test/transforms/fixtures/delete/across-blocks-inlines/output.yaml @@ -7,11 +7,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: link nodes: - kind: text - ranges: - - text: other + text: other diff --git a/test/transforms/fixtures/delete/first-character/input.yaml b/test/transforms/fixtures/delete/first-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete/first-character/input.yaml +++ b/test/transforms/fixtures/delete/first-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete/first-character/output.yaml b/test/transforms/fixtures/delete/first-character/output.yaml index 9414f68ce..13a26e096 100644 --- a/test/transforms/fixtures/delete/first-character/output.yaml +++ b/test/transforms/fixtures/delete/first-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: ord + text: ord diff --git a/test/transforms/fixtures/delete/join-blocks-and-trim/input.yaml b/test/transforms/fixtures/delete/join-blocks-and-trim/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/delete/join-blocks-and-trim/input.yaml +++ b/test/transforms/fixtures/delete/join-blocks-and-trim/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/delete/join-blocks-and-trim/output.yaml b/test/transforms/fixtures/delete/join-blocks-and-trim/output.yaml index 0a088f236..64b242e25 100644 --- a/test/transforms/fixtures/delete/join-blocks-and-trim/output.yaml +++ b/test/transforms/fixtures/delete/join-blocks-and-trim/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: woother + text: woother diff --git a/test/transforms/fixtures/delete/join-blocks/input.yaml b/test/transforms/fixtures/delete/join-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/delete/join-blocks/input.yaml +++ b/test/transforms/fixtures/delete/join-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/delete/join-blocks/output.yaml b/test/transforms/fixtures/delete/join-blocks/output.yaml index 3d5aad120..ef8246e52 100644 --- a/test/transforms/fixtures/delete/join-blocks/output.yaml +++ b/test/transforms/fixtures/delete/join-blocks/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wordanother + text: wordanother diff --git a/test/transforms/fixtures/delete/last-character/input.yaml b/test/transforms/fixtures/delete/last-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete/last-character/input.yaml +++ b/test/transforms/fixtures/delete/last-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete/last-character/output.yaml b/test/transforms/fixtures/delete/last-character/output.yaml index 870bf02c6..2ee7c9598 100644 --- a/test/transforms/fixtures/delete/last-character/output.yaml +++ b/test/transforms/fixtures/delete/last-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wor + text: wor diff --git a/test/transforms/fixtures/delete/middle-character/input.yaml b/test/transforms/fixtures/delete/middle-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete/middle-character/input.yaml +++ b/test/transforms/fixtures/delete/middle-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete/middle-character/output.yaml b/test/transforms/fixtures/delete/middle-character/output.yaml index b82be33b4..01b01acfe 100644 --- a/test/transforms/fixtures/delete/middle-character/output.yaml +++ b/test/transforms/fixtures/delete/middle-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wrd + text: wrd diff --git a/test/transforms/fixtures/delete/nested-block/input.yaml b/test/transforms/fixtures/delete/nested-block/input.yaml index d9219034b..cc326eae0 100644 --- a/test/transforms/fixtures/delete/nested-block/input.yaml +++ b/test/transforms/fixtures/delete/nested-block/input.yaml @@ -4,8 +4,7 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -13,11 +12,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: middle + text: middle - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/delete/nested-block/output.yaml b/test/transforms/fixtures/delete/nested-block/output.yaml index 0a088f236..64b242e25 100644 --- a/test/transforms/fixtures/delete/nested-block/output.yaml +++ b/test/transforms/fixtures/delete/nested-block/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: woother + text: woother diff --git a/test/transforms/fixtures/delete/whole-word/input.yaml b/test/transforms/fixtures/delete/whole-word/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/delete/whole-word/input.yaml +++ b/test/transforms/fixtures/delete/whole-word/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/delete/whole-word/output.yaml b/test/transforms/fixtures/delete/whole-word/output.yaml index a1bc55c38..f6de4d08a 100644 --- a/test/transforms/fixtures/delete/whole-word/output.yaml +++ b/test/transforms/fixtures/delete/whole-word/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/insert-block-at-range/block-end/input.yaml b/test/transforms/fixtures/insert-block-at-range/block-end/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-block-at-range/block-end/input.yaml +++ b/test/transforms/fixtures/insert-block-at-range/block-end/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-block-at-range/block-end/output.yaml b/test/transforms/fixtures/insert-block-at-range/block-end/output.yaml index 25edf0511..b133ea3fa 100644 --- a/test/transforms/fixtures/insert-block-at-range/block-end/output.yaml +++ b/test/transforms/fixtures/insert-block-at-range/block-end/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: image nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/insert-block-at-range/block-middle/input.yaml b/test/transforms/fixtures/insert-block-at-range/block-middle/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-block-at-range/block-middle/input.yaml +++ b/test/transforms/fixtures/insert-block-at-range/block-middle/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-block-at-range/block-middle/output.yaml b/test/transforms/fixtures/insert-block-at-range/block-middle/output.yaml index 20dde1c86..4d76e4866 100644 --- a/test/transforms/fixtures/insert-block-at-range/block-middle/output.yaml +++ b/test/transforms/fixtures/insert-block-at-range/block-middle/output.yaml @@ -4,17 +4,14 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wo + text: wo - kind: block type: image nodes: - kind: text - ranges: - - text: "" + text: "" - kind: block type: paragraph nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/insert-block-at-range/block-start/input.yaml b/test/transforms/fixtures/insert-block-at-range/block-start/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-block-at-range/block-start/input.yaml +++ b/test/transforms/fixtures/insert-block-at-range/block-start/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-block-at-range/block-start/output.yaml b/test/transforms/fixtures/insert-block-at-range/block-start/output.yaml index 41765e641..bf2ea138a 100644 --- a/test/transforms/fixtures/insert-block-at-range/block-start/output.yaml +++ b/test/transforms/fixtures/insert-block-at-range/block-start/output.yaml @@ -4,11 +4,9 @@ nodes: type: image nodes: - kind: text - ranges: - - text: "" + text: "" - kind: block type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-block-at-range/is-empty/input.yaml b/test/transforms/fixtures/insert-block-at-range/is-empty/input.yaml index a1bc55c38..f6de4d08a 100644 --- a/test/transforms/fixtures/insert-block-at-range/is-empty/input.yaml +++ b/test/transforms/fixtures/insert-block-at-range/is-empty/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/insert-block-at-range/is-empty/output.yaml b/test/transforms/fixtures/insert-block-at-range/is-empty/output.yaml index 4dae542ef..68da1740e 100644 --- a/test/transforms/fixtures/insert-block-at-range/is-empty/output.yaml +++ b/test/transforms/fixtures/insert-block-at-range/is-empty/output.yaml @@ -4,5 +4,4 @@ nodes: type: image nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/insert-block-at-range/is-void/input.yaml b/test/transforms/fixtures/insert-block-at-range/is-void/input.yaml index 43146f431..1700caf75 100644 --- a/test/transforms/fixtures/insert-block-at-range/is-void/input.yaml +++ b/test/transforms/fixtures/insert-block-at-range/is-void/input.yaml @@ -5,5 +5,4 @@ nodes: isVoid: true nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/insert-block-at-range/is-void/output.yaml b/test/transforms/fixtures/insert-block-at-range/is-void/output.yaml index 0e9fe0b31..8d6405375 100644 --- a/test/transforms/fixtures/insert-block-at-range/is-void/output.yaml +++ b/test/transforms/fixtures/insert-block-at-range/is-void/output.yaml @@ -3,13 +3,8 @@ nodes: - kind: block type: image isVoid: true - nodes: - - kind: text - ranges: - - text: "" - kind: block type: image nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/insert-block-at-range/with-block/input.yaml b/test/transforms/fixtures/insert-block-at-range/with-block/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-block-at-range/with-block/input.yaml +++ b/test/transforms/fixtures/insert-block-at-range/with-block/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-block-at-range/with-block/output.yaml b/test/transforms/fixtures/insert-block-at-range/with-block/output.yaml index 41765e641..bf2ea138a 100644 --- a/test/transforms/fixtures/insert-block-at-range/with-block/output.yaml +++ b/test/transforms/fixtures/insert-block-at-range/with-block/output.yaml @@ -4,11 +4,9 @@ nodes: type: image nodes: - kind: text - ranges: - - text: "" + text: "" - kind: block type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-block-at-range/with-object/input.yaml b/test/transforms/fixtures/insert-block-at-range/with-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-block-at-range/with-object/input.yaml +++ b/test/transforms/fixtures/insert-block-at-range/with-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-block-at-range/with-object/output.yaml b/test/transforms/fixtures/insert-block-at-range/with-object/output.yaml index 41765e641..bf2ea138a 100644 --- a/test/transforms/fixtures/insert-block-at-range/with-object/output.yaml +++ b/test/transforms/fixtures/insert-block-at-range/with-object/output.yaml @@ -4,11 +4,9 @@ nodes: type: image nodes: - kind: text - ranges: - - text: "" + text: "" - kind: block type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-block/block-end/input.yaml b/test/transforms/fixtures/insert-block/block-end/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-block/block-end/input.yaml +++ b/test/transforms/fixtures/insert-block/block-end/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-block/block-end/output.yaml b/test/transforms/fixtures/insert-block/block-end/output.yaml index 25edf0511..b133ea3fa 100644 --- a/test/transforms/fixtures/insert-block/block-end/output.yaml +++ b/test/transforms/fixtures/insert-block/block-end/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: image nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/insert-block/block-middle/input.yaml b/test/transforms/fixtures/insert-block/block-middle/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-block/block-middle/input.yaml +++ b/test/transforms/fixtures/insert-block/block-middle/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-block/block-middle/output.yaml b/test/transforms/fixtures/insert-block/block-middle/output.yaml index 20dde1c86..4d76e4866 100644 --- a/test/transforms/fixtures/insert-block/block-middle/output.yaml +++ b/test/transforms/fixtures/insert-block/block-middle/output.yaml @@ -4,17 +4,14 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wo + text: wo - kind: block type: image nodes: - kind: text - ranges: - - text: "" + text: "" - kind: block type: paragraph nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/insert-block/block-start/input.yaml b/test/transforms/fixtures/insert-block/block-start/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-block/block-start/input.yaml +++ b/test/transforms/fixtures/insert-block/block-start/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-block/block-start/output.yaml b/test/transforms/fixtures/insert-block/block-start/output.yaml index 41765e641..bf2ea138a 100644 --- a/test/transforms/fixtures/insert-block/block-start/output.yaml +++ b/test/transforms/fixtures/insert-block/block-start/output.yaml @@ -4,11 +4,9 @@ nodes: type: image nodes: - kind: text - ranges: - - text: "" + text: "" - kind: block type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-block/is-empty/input.yaml b/test/transforms/fixtures/insert-block/is-empty/input.yaml index a1bc55c38..f6de4d08a 100644 --- a/test/transforms/fixtures/insert-block/is-empty/input.yaml +++ b/test/transforms/fixtures/insert-block/is-empty/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/insert-block/is-empty/output.yaml b/test/transforms/fixtures/insert-block/is-empty/output.yaml index 4dae542ef..68da1740e 100644 --- a/test/transforms/fixtures/insert-block/is-empty/output.yaml +++ b/test/transforms/fixtures/insert-block/is-empty/output.yaml @@ -4,5 +4,4 @@ nodes: type: image nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/insert-block/is-void/input.yaml b/test/transforms/fixtures/insert-block/is-void/input.yaml index 43146f431..1700caf75 100644 --- a/test/transforms/fixtures/insert-block/is-void/input.yaml +++ b/test/transforms/fixtures/insert-block/is-void/input.yaml @@ -5,5 +5,4 @@ nodes: isVoid: true nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/insert-block/is-void/output.yaml b/test/transforms/fixtures/insert-block/is-void/output.yaml index 0e9fe0b31..8d6405375 100644 --- a/test/transforms/fixtures/insert-block/is-void/output.yaml +++ b/test/transforms/fixtures/insert-block/is-void/output.yaml @@ -3,13 +3,8 @@ nodes: - kind: block type: image isVoid: true - nodes: - - kind: text - ranges: - - text: "" - kind: block type: image nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/insert-block/with-block/input.yaml b/test/transforms/fixtures/insert-block/with-block/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-block/with-block/input.yaml +++ b/test/transforms/fixtures/insert-block/with-block/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-block/with-block/output.yaml b/test/transforms/fixtures/insert-block/with-block/output.yaml index 41765e641..bf2ea138a 100644 --- a/test/transforms/fixtures/insert-block/with-block/output.yaml +++ b/test/transforms/fixtures/insert-block/with-block/output.yaml @@ -4,11 +4,9 @@ nodes: type: image nodes: - kind: text - ranges: - - text: "" + text: "" - kind: block type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-block/with-object/input.yaml b/test/transforms/fixtures/insert-block/with-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-block/with-object/input.yaml +++ b/test/transforms/fixtures/insert-block/with-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-block/with-object/output.yaml b/test/transforms/fixtures/insert-block/with-object/output.yaml index 41765e641..bf2ea138a 100644 --- a/test/transforms/fixtures/insert-block/with-object/output.yaml +++ b/test/transforms/fixtures/insert-block/with-object/output.yaml @@ -4,11 +4,9 @@ nodes: type: image nodes: - kind: text - ranges: - - text: "" + text: "" - kind: block type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment-at-range/end-block/fragment.yaml b/test/transforms/fixtures/insert-fragment-at-range/end-block/fragment.yaml index 3466f52fd..cedcb80d3 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/end-block/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/end-block/fragment.yaml @@ -4,5 +4,4 @@ nodes: type: list-item nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment-at-range/end-block/index.js b/test/transforms/fixtures/insert-fragment-at-range/end-block/index.js index f312343f4..39ace9f07 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/end-block/index.js +++ b/test/transforms/fixtures/insert-fragment-at-range/end-block/index.js @@ -6,7 +6,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment-at-range/end-block/input.yaml b/test/transforms/fixtures/insert-fragment-at-range/end-block/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/end-block/input.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/end-block/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment-at-range/end-block/output.yaml b/test/transforms/fixtures/insert-fragment-at-range/end-block/output.yaml index 76e16266b..91f3814c6 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/end-block/output.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/end-block/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wordfragment + text: wordfragment diff --git a/test/transforms/fixtures/insert-fragment-at-range/end-inline/fragment.yaml b/test/transforms/fixtures/insert-fragment-at-range/end-inline/fragment.yaml index 3466f52fd..cedcb80d3 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/end-inline/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/end-inline/fragment.yaml @@ -4,5 +4,4 @@ nodes: type: list-item nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment-at-range/end-inline/index.js b/test/transforms/fixtures/insert-fragment-at-range/end-inline/index.js index f312343f4..39ace9f07 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/end-inline/index.js +++ b/test/transforms/fixtures/insert-fragment-at-range/end-inline/index.js @@ -6,7 +6,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment-at-range/end-inline/input.yaml b/test/transforms/fixtures/insert-fragment-at-range/end-inline/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/end-inline/input.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/end-inline/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment-at-range/end-inline/output.yaml b/test/transforms/fixtures/insert-fragment-at-range/end-inline/output.yaml index b688f1365..e67f3259f 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/end-inline/output.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/end-inline/output.yaml @@ -7,8 +7,6 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment-at-range/middle-block-multiple-fragment-blocks/index.js b/test/transforms/fixtures/insert-fragment-at-range/middle-block-multiple-fragment-blocks/index.js index ba97d8c10..940b20996 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/middle-block-multiple-fragment-blocks/index.js +++ b/test/transforms/fixtures/insert-fragment-at-range/middle-block-multiple-fragment-blocks/index.js @@ -6,7 +6,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment-at-range/middle-block-multiple-fragment-blocks/input.yaml b/test/transforms/fixtures/insert-fragment-at-range/middle-block-multiple-fragment-blocks/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/middle-block-multiple-fragment-blocks/input.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/middle-block-multiple-fragment-blocks/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment-at-range/middle-block-multiple-fragment-blocks/output.yaml b/test/transforms/fixtures/insert-fragment-at-range/middle-block-multiple-fragment-blocks/output.yaml index e9cccfc57..13fca7403 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/middle-block-multiple-fragment-blocks/output.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/middle-block-multiple-fragment-blocks/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wofragment one + text: wofragment one - kind: block type: list-item nodes: - kind: text - ranges: - - text: fragment tword + text: fragment tword diff --git a/test/transforms/fixtures/insert-fragment-at-range/middle-block/fragment.yaml b/test/transforms/fixtures/insert-fragment-at-range/middle-block/fragment.yaml index 3466f52fd..cedcb80d3 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/middle-block/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/middle-block/fragment.yaml @@ -4,5 +4,4 @@ nodes: type: list-item nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment-at-range/middle-block/index.js b/test/transforms/fixtures/insert-fragment-at-range/middle-block/index.js index ba97d8c10..940b20996 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/middle-block/index.js +++ b/test/transforms/fixtures/insert-fragment-at-range/middle-block/index.js @@ -6,7 +6,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment-at-range/middle-block/input.yaml b/test/transforms/fixtures/insert-fragment-at-range/middle-block/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/middle-block/input.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/middle-block/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment-at-range/middle-block/output.yaml b/test/transforms/fixtures/insert-fragment-at-range/middle-block/output.yaml index 781a28f42..8ab7f0a55 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/middle-block/output.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/middle-block/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wofragmentrd + text: wofragmentrd diff --git a/test/transforms/fixtures/insert-fragment-at-range/middle-inline-fragment-inline/fragment.yaml b/test/transforms/fixtures/insert-fragment-at-range/middle-inline-fragment-inline/fragment.yaml index 4a6565303..18b4f2969 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/middle-inline-fragment-inline/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/middle-inline-fragment-inline/fragment.yaml @@ -7,5 +7,4 @@ nodes: type: hashtag nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment-at-range/middle-inline-fragment-inline/index.js b/test/transforms/fixtures/insert-fragment-at-range/middle-inline-fragment-inline/index.js index ba97d8c10..940b20996 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/middle-inline-fragment-inline/index.js +++ b/test/transforms/fixtures/insert-fragment-at-range/middle-inline-fragment-inline/index.js @@ -6,7 +6,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment-at-range/middle-inline-fragment-inline/input.yaml b/test/transforms/fixtures/insert-fragment-at-range/middle-inline-fragment-inline/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/middle-inline-fragment-inline/input.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/middle-inline-fragment-inline/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment-at-range/middle-inline-fragment-inline/output.yaml b/test/transforms/fixtures/insert-fragment-at-range/middle-inline-fragment-inline/output.yaml index f1f97eac7..c46ff4c5c 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/middle-inline-fragment-inline/output.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/middle-inline-fragment-inline/output.yaml @@ -7,17 +7,14 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: hashtag nodes: - kind: text - ranges: - - text: fragment + text: fragment - kind: inline type: link nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/insert-fragment-at-range/middle-inline/fragment.yaml b/test/transforms/fixtures/insert-fragment-at-range/middle-inline/fragment.yaml index 3466f52fd..cedcb80d3 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/middle-inline/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/middle-inline/fragment.yaml @@ -4,5 +4,4 @@ nodes: type: list-item nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment-at-range/middle-inline/index.js b/test/transforms/fixtures/insert-fragment-at-range/middle-inline/index.js index ba97d8c10..940b20996 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/middle-inline/index.js +++ b/test/transforms/fixtures/insert-fragment-at-range/middle-inline/index.js @@ -6,7 +6,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment-at-range/middle-inline/input.yaml b/test/transforms/fixtures/insert-fragment-at-range/middle-inline/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/middle-inline/input.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/middle-inline/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment-at-range/middle-inline/output.yaml b/test/transforms/fixtures/insert-fragment-at-range/middle-inline/output.yaml index 7b1d5b6ea..89a19d352 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/middle-inline/output.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/middle-inline/output.yaml @@ -7,14 +7,11 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: text - ranges: - - text: fragment + text: fragment - kind: inline type: link nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/insert-fragment-at-range/start-block/fragment.yaml b/test/transforms/fixtures/insert-fragment-at-range/start-block/fragment.yaml index 3466f52fd..cedcb80d3 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/start-block/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/start-block/fragment.yaml @@ -4,5 +4,4 @@ nodes: type: list-item nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment-at-range/start-block/index.js b/test/transforms/fixtures/insert-fragment-at-range/start-block/index.js index 0f00b734b..ea18a6543 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/start-block/index.js +++ b/test/transforms/fixtures/insert-fragment-at-range/start-block/index.js @@ -6,7 +6,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment-at-range/start-block/input.yaml b/test/transforms/fixtures/insert-fragment-at-range/start-block/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/start-block/input.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/start-block/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment-at-range/start-block/output.yaml b/test/transforms/fixtures/insert-fragment-at-range/start-block/output.yaml index 6b026e5b2..0c2d77fa3 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/start-block/output.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/start-block/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: fragmentword + text: fragmentword diff --git a/test/transforms/fixtures/insert-fragment-at-range/start-inline/fragment.yaml b/test/transforms/fixtures/insert-fragment-at-range/start-inline/fragment.yaml index 3466f52fd..cedcb80d3 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/start-inline/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/start-inline/fragment.yaml @@ -4,5 +4,4 @@ nodes: type: list-item nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment-at-range/start-inline/index.js b/test/transforms/fixtures/insert-fragment-at-range/start-inline/index.js index 0f00b734b..ea18a6543 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/start-inline/index.js +++ b/test/transforms/fixtures/insert-fragment-at-range/start-inline/index.js @@ -6,7 +6,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment-at-range/start-inline/input.yaml b/test/transforms/fixtures/insert-fragment-at-range/start-inline/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/start-inline/input.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/start-inline/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment-at-range/start-inline/output.yaml b/test/transforms/fixtures/insert-fragment-at-range/start-inline/output.yaml index 2f3ee719b..aab1b1ea4 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/start-inline/output.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/start-inline/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: fragment + text: fragment - kind: inline type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment-at-range/start-second-block/fragment.yaml b/test/transforms/fixtures/insert-fragment-at-range/start-second-block/fragment.yaml index 3466f52fd..cedcb80d3 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/start-second-block/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/start-second-block/fragment.yaml @@ -4,5 +4,4 @@ nodes: type: list-item nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment-at-range/start-second-block/index.js b/test/transforms/fixtures/insert-fragment-at-range/start-second-block/index.js index 16625a46f..bf86d4992 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/start-second-block/index.js +++ b/test/transforms/fixtures/insert-fragment-at-range/start-second-block/index.js @@ -6,7 +6,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment-at-range/start-second-block/input.yaml b/test/transforms/fixtures/insert-fragment-at-range/start-second-block/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/start-second-block/input.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/start-second-block/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/insert-fragment-at-range/start-second-block/output.yaml b/test/transforms/fixtures/insert-fragment-at-range/start-second-block/output.yaml index e111fd668..fb9622b96 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/start-second-block/output.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/start-second-block/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: fragmentanother + text: fragmentanother diff --git a/test/transforms/fixtures/insert-fragment-at-range/with-delete-across-blocks/fragment.yaml b/test/transforms/fixtures/insert-fragment-at-range/with-delete-across-blocks/fragment.yaml index 3466f52fd..cedcb80d3 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/with-delete-across-blocks/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/with-delete-across-blocks/fragment.yaml @@ -4,5 +4,4 @@ nodes: type: list-item nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment-at-range/with-delete-across-blocks/index.js b/test/transforms/fixtures/insert-fragment-at-range/with-delete-across-blocks/index.js index b3b68b702..f23b3b5cb 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/with-delete-across-blocks/index.js +++ b/test/transforms/fixtures/insert-fragment-at-range/with-delete-across-blocks/index.js @@ -6,7 +6,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment-at-range/with-delete-across-blocks/input.yaml b/test/transforms/fixtures/insert-fragment-at-range/with-delete-across-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/with-delete-across-blocks/input.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/with-delete-across-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/insert-fragment-at-range/with-delete-across-blocks/output.yaml b/test/transforms/fixtures/insert-fragment-at-range/with-delete-across-blocks/output.yaml index 40ab49522..cb530f5c6 100644 --- a/test/transforms/fixtures/insert-fragment-at-range/with-delete-across-blocks/output.yaml +++ b/test/transforms/fixtures/insert-fragment-at-range/with-delete-across-blocks/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wofragmentother + text: wofragmentother diff --git a/test/transforms/fixtures/insert-fragment/end-block/fragment.yaml b/test/transforms/fixtures/insert-fragment/end-block/fragment.yaml index 3466f52fd..cedcb80d3 100644 --- a/test/transforms/fixtures/insert-fragment/end-block/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment/end-block/fragment.yaml @@ -4,5 +4,4 @@ nodes: type: list-item nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment/end-block/index.js b/test/transforms/fixtures/insert-fragment/end-block/index.js index 5cdcd6cab..acfa9a39c 100644 --- a/test/transforms/fixtures/insert-fragment/end-block/index.js +++ b/test/transforms/fixtures/insert-fragment/end-block/index.js @@ -7,7 +7,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment/end-block/input.yaml b/test/transforms/fixtures/insert-fragment/end-block/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-fragment/end-block/input.yaml +++ b/test/transforms/fixtures/insert-fragment/end-block/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment/end-block/output.yaml b/test/transforms/fixtures/insert-fragment/end-block/output.yaml index 76e16266b..91f3814c6 100644 --- a/test/transforms/fixtures/insert-fragment/end-block/output.yaml +++ b/test/transforms/fixtures/insert-fragment/end-block/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wordfragment + text: wordfragment diff --git a/test/transforms/fixtures/insert-fragment/end-inline/fragment.yaml b/test/transforms/fixtures/insert-fragment/end-inline/fragment.yaml index 3466f52fd..cedcb80d3 100644 --- a/test/transforms/fixtures/insert-fragment/end-inline/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment/end-inline/fragment.yaml @@ -4,5 +4,4 @@ nodes: type: list-item nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment/end-inline/index.js b/test/transforms/fixtures/insert-fragment/end-inline/index.js index 01b07f352..52c46f8c3 100644 --- a/test/transforms/fixtures/insert-fragment/end-inline/index.js +++ b/test/transforms/fixtures/insert-fragment/end-inline/index.js @@ -7,7 +7,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment/end-inline/input.yaml b/test/transforms/fixtures/insert-fragment/end-inline/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/insert-fragment/end-inline/input.yaml +++ b/test/transforms/fixtures/insert-fragment/end-inline/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment/end-inline/output.yaml b/test/transforms/fixtures/insert-fragment/end-inline/output.yaml index b688f1365..e67f3259f 100644 --- a/test/transforms/fixtures/insert-fragment/end-inline/output.yaml +++ b/test/transforms/fixtures/insert-fragment/end-inline/output.yaml @@ -7,8 +7,6 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment/middle-block-multiple-fragment-blocks/index.js b/test/transforms/fixtures/insert-fragment/middle-block-multiple-fragment-blocks/index.js index 87c24c702..d58efb45b 100644 --- a/test/transforms/fixtures/insert-fragment/middle-block-multiple-fragment-blocks/index.js +++ b/test/transforms/fixtures/insert-fragment/middle-block-multiple-fragment-blocks/index.js @@ -7,7 +7,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment/middle-block-multiple-fragment-blocks/input.yaml b/test/transforms/fixtures/insert-fragment/middle-block-multiple-fragment-blocks/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-fragment/middle-block-multiple-fragment-blocks/input.yaml +++ b/test/transforms/fixtures/insert-fragment/middle-block-multiple-fragment-blocks/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment/middle-block-multiple-fragment-blocks/output.yaml b/test/transforms/fixtures/insert-fragment/middle-block-multiple-fragment-blocks/output.yaml index e9cccfc57..13fca7403 100644 --- a/test/transforms/fixtures/insert-fragment/middle-block-multiple-fragment-blocks/output.yaml +++ b/test/transforms/fixtures/insert-fragment/middle-block-multiple-fragment-blocks/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wofragment one + text: wofragment one - kind: block type: list-item nodes: - kind: text - ranges: - - text: fragment tword + text: fragment tword diff --git a/test/transforms/fixtures/insert-fragment/middle-block/fragment.yaml b/test/transforms/fixtures/insert-fragment/middle-block/fragment.yaml index 3466f52fd..cedcb80d3 100644 --- a/test/transforms/fixtures/insert-fragment/middle-block/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment/middle-block/fragment.yaml @@ -4,5 +4,4 @@ nodes: type: list-item nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment/middle-block/index.js b/test/transforms/fixtures/insert-fragment/middle-block/index.js index 155bdd26f..55cb16554 100644 --- a/test/transforms/fixtures/insert-fragment/middle-block/index.js +++ b/test/transforms/fixtures/insert-fragment/middle-block/index.js @@ -7,7 +7,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment/middle-block/input.yaml b/test/transforms/fixtures/insert-fragment/middle-block/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-fragment/middle-block/input.yaml +++ b/test/transforms/fixtures/insert-fragment/middle-block/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment/middle-block/output.yaml b/test/transforms/fixtures/insert-fragment/middle-block/output.yaml index 781a28f42..8ab7f0a55 100644 --- a/test/transforms/fixtures/insert-fragment/middle-block/output.yaml +++ b/test/transforms/fixtures/insert-fragment/middle-block/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wofragmentrd + text: wofragmentrd diff --git a/test/transforms/fixtures/insert-fragment/middle-inline-fragment-inline/fragment.yaml b/test/transforms/fixtures/insert-fragment/middle-inline-fragment-inline/fragment.yaml index 4a6565303..18b4f2969 100644 --- a/test/transforms/fixtures/insert-fragment/middle-inline-fragment-inline/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment/middle-inline-fragment-inline/fragment.yaml @@ -7,5 +7,4 @@ nodes: type: hashtag nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment/middle-inline-fragment-inline/index.js b/test/transforms/fixtures/insert-fragment/middle-inline-fragment-inline/index.js index edb676e9a..1a381fb1e 100644 --- a/test/transforms/fixtures/insert-fragment/middle-inline-fragment-inline/index.js +++ b/test/transforms/fixtures/insert-fragment/middle-inline-fragment-inline/index.js @@ -7,7 +7,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment/middle-inline-fragment-inline/input.yaml b/test/transforms/fixtures/insert-fragment/middle-inline-fragment-inline/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/insert-fragment/middle-inline-fragment-inline/input.yaml +++ b/test/transforms/fixtures/insert-fragment/middle-inline-fragment-inline/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment/middle-inline-fragment-inline/output.yaml b/test/transforms/fixtures/insert-fragment/middle-inline-fragment-inline/output.yaml index f1f97eac7..c46ff4c5c 100644 --- a/test/transforms/fixtures/insert-fragment/middle-inline-fragment-inline/output.yaml +++ b/test/transforms/fixtures/insert-fragment/middle-inline-fragment-inline/output.yaml @@ -7,17 +7,14 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: hashtag nodes: - kind: text - ranges: - - text: fragment + text: fragment - kind: inline type: link nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/insert-fragment/middle-inline/fragment.yaml b/test/transforms/fixtures/insert-fragment/middle-inline/fragment.yaml index 3466f52fd..cedcb80d3 100644 --- a/test/transforms/fixtures/insert-fragment/middle-inline/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment/middle-inline/fragment.yaml @@ -4,5 +4,4 @@ nodes: type: list-item nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment/middle-inline/index.js b/test/transforms/fixtures/insert-fragment/middle-inline/index.js index 87c24c702..d58efb45b 100644 --- a/test/transforms/fixtures/insert-fragment/middle-inline/index.js +++ b/test/transforms/fixtures/insert-fragment/middle-inline/index.js @@ -7,7 +7,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment/middle-inline/input.yaml b/test/transforms/fixtures/insert-fragment/middle-inline/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/insert-fragment/middle-inline/input.yaml +++ b/test/transforms/fixtures/insert-fragment/middle-inline/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment/middle-inline/output.yaml b/test/transforms/fixtures/insert-fragment/middle-inline/output.yaml index 7b1d5b6ea..89a19d352 100644 --- a/test/transforms/fixtures/insert-fragment/middle-inline/output.yaml +++ b/test/transforms/fixtures/insert-fragment/middle-inline/output.yaml @@ -7,14 +7,11 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: text - ranges: - - text: fragment + text: fragment - kind: inline type: link nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/insert-fragment/start-block/fragment.yaml b/test/transforms/fixtures/insert-fragment/start-block/fragment.yaml index 3466f52fd..cedcb80d3 100644 --- a/test/transforms/fixtures/insert-fragment/start-block/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment/start-block/fragment.yaml @@ -4,5 +4,4 @@ nodes: type: list-item nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment/start-block/index.js b/test/transforms/fixtures/insert-fragment/start-block/index.js index fc2d3d8d7..3e098b88f 100644 --- a/test/transforms/fixtures/insert-fragment/start-block/index.js +++ b/test/transforms/fixtures/insert-fragment/start-block/index.js @@ -7,7 +7,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment/start-block/input.yaml b/test/transforms/fixtures/insert-fragment/start-block/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-fragment/start-block/input.yaml +++ b/test/transforms/fixtures/insert-fragment/start-block/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment/start-block/output.yaml b/test/transforms/fixtures/insert-fragment/start-block/output.yaml index 6b026e5b2..0c2d77fa3 100644 --- a/test/transforms/fixtures/insert-fragment/start-block/output.yaml +++ b/test/transforms/fixtures/insert-fragment/start-block/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: fragmentword + text: fragmentword diff --git a/test/transforms/fixtures/insert-fragment/start-inline/fragment.yaml b/test/transforms/fixtures/insert-fragment/start-inline/fragment.yaml index 3466f52fd..cedcb80d3 100644 --- a/test/transforms/fixtures/insert-fragment/start-inline/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment/start-inline/fragment.yaml @@ -4,5 +4,4 @@ nodes: type: list-item nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment/start-inline/index.js b/test/transforms/fixtures/insert-fragment/start-inline/index.js index fc2d3d8d7..3e098b88f 100644 --- a/test/transforms/fixtures/insert-fragment/start-inline/index.js +++ b/test/transforms/fixtures/insert-fragment/start-inline/index.js @@ -7,7 +7,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment/start-inline/input.yaml b/test/transforms/fixtures/insert-fragment/start-inline/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/insert-fragment/start-inline/input.yaml +++ b/test/transforms/fixtures/insert-fragment/start-inline/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment/start-inline/output.yaml b/test/transforms/fixtures/insert-fragment/start-inline/output.yaml index 2f3ee719b..aab1b1ea4 100644 --- a/test/transforms/fixtures/insert-fragment/start-inline/output.yaml +++ b/test/transforms/fixtures/insert-fragment/start-inline/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: fragment + text: fragment - kind: inline type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-fragment/start-second-block/fragment.yaml b/test/transforms/fixtures/insert-fragment/start-second-block/fragment.yaml index 3466f52fd..cedcb80d3 100644 --- a/test/transforms/fixtures/insert-fragment/start-second-block/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment/start-second-block/fragment.yaml @@ -4,5 +4,4 @@ nodes: type: list-item nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment/start-second-block/index.js b/test/transforms/fixtures/insert-fragment/start-second-block/index.js index 8fd753ff3..fc201f394 100644 --- a/test/transforms/fixtures/insert-fragment/start-second-block/index.js +++ b/test/transforms/fixtures/insert-fragment/start-second-block/index.js @@ -7,7 +7,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment/start-second-block/input.yaml b/test/transforms/fixtures/insert-fragment/start-second-block/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/insert-fragment/start-second-block/input.yaml +++ b/test/transforms/fixtures/insert-fragment/start-second-block/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/insert-fragment/start-second-block/output.yaml b/test/transforms/fixtures/insert-fragment/start-second-block/output.yaml index e111fd668..fb9622b96 100644 --- a/test/transforms/fixtures/insert-fragment/start-second-block/output.yaml +++ b/test/transforms/fixtures/insert-fragment/start-second-block/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: fragmentanother + text: fragmentanother diff --git a/test/transforms/fixtures/insert-fragment/with-delete-across-blocks/fragment.yaml b/test/transforms/fixtures/insert-fragment/with-delete-across-blocks/fragment.yaml index 3466f52fd..cedcb80d3 100644 --- a/test/transforms/fixtures/insert-fragment/with-delete-across-blocks/fragment.yaml +++ b/test/transforms/fixtures/insert-fragment/with-delete-across-blocks/fragment.yaml @@ -4,5 +4,4 @@ nodes: type: list-item nodes: - kind: text - ranges: - - text: fragment + text: fragment diff --git a/test/transforms/fixtures/insert-fragment/with-delete-across-blocks/index.js b/test/transforms/fixtures/insert-fragment/with-delete-across-blocks/index.js index 2fe0f3c5f..e34b6aaed 100644 --- a/test/transforms/fixtures/insert-fragment/with-delete-across-blocks/index.js +++ b/test/transforms/fixtures/insert-fragment/with-delete-across-blocks/index.js @@ -7,7 +7,7 @@ import { Raw } from '../../../../..' export default function (state) { const file = path.resolve(__dirname, 'fragment.yaml') const raw = readMetadata.sync(file) - const fragment = Raw.deserialize(raw).document + const fragment = Raw.deserialize(raw, { terse: true }).document const { document, selection } = state const texts = document.getTexts() diff --git a/test/transforms/fixtures/insert-fragment/with-delete-across-blocks/input.yaml b/test/transforms/fixtures/insert-fragment/with-delete-across-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/insert-fragment/with-delete-across-blocks/input.yaml +++ b/test/transforms/fixtures/insert-fragment/with-delete-across-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/insert-fragment/with-delete-across-blocks/output.yaml b/test/transforms/fixtures/insert-fragment/with-delete-across-blocks/output.yaml index 40ab49522..cb530f5c6 100644 --- a/test/transforms/fixtures/insert-fragment/with-delete-across-blocks/output.yaml +++ b/test/transforms/fixtures/insert-fragment/with-delete-across-blocks/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wofragmentother + text: wofragmentother diff --git a/test/transforms/fixtures/insert-inline-at-range/block-end/input.yaml b/test/transforms/fixtures/insert-inline-at-range/block-end/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-inline-at-range/block-end/input.yaml +++ b/test/transforms/fixtures/insert-inline-at-range/block-end/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-inline-at-range/block-end/output.yaml b/test/transforms/fixtures/insert-inline-at-range/block-end/output.yaml index 8c747f290..d36cb71e5 100644 --- a/test/transforms/fixtures/insert-inline-at-range/block-end/output.yaml +++ b/test/transforms/fixtures/insert-inline-at-range/block-end/output.yaml @@ -4,14 +4,11 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: inline type: hashtag nodes: - kind: text - ranges: - - text: "" + text: "" - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/insert-inline-at-range/block-middle/input.yaml b/test/transforms/fixtures/insert-inline-at-range/block-middle/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-inline-at-range/block-middle/input.yaml +++ b/test/transforms/fixtures/insert-inline-at-range/block-middle/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-inline-at-range/block-middle/output.yaml b/test/transforms/fixtures/insert-inline-at-range/block-middle/output.yaml index 20dde1c86..4d76e4866 100644 --- a/test/transforms/fixtures/insert-inline-at-range/block-middle/output.yaml +++ b/test/transforms/fixtures/insert-inline-at-range/block-middle/output.yaml @@ -4,17 +4,14 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wo + text: wo - kind: block type: image nodes: - kind: text - ranges: - - text: "" + text: "" - kind: block type: paragraph nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/insert-inline-at-range/block-start/input.yaml b/test/transforms/fixtures/insert-inline-at-range/block-start/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-inline-at-range/block-start/input.yaml +++ b/test/transforms/fixtures/insert-inline-at-range/block-start/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-inline-at-range/block-start/output.yaml b/test/transforms/fixtures/insert-inline-at-range/block-start/output.yaml index 41765e641..bf2ea138a 100644 --- a/test/transforms/fixtures/insert-inline-at-range/block-start/output.yaml +++ b/test/transforms/fixtures/insert-inline-at-range/block-start/output.yaml @@ -4,11 +4,9 @@ nodes: type: image nodes: - kind: text - ranges: - - text: "" + text: "" - kind: block type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-inline-at-range/is-empty/input.yaml b/test/transforms/fixtures/insert-inline-at-range/is-empty/input.yaml index a1bc55c38..f6de4d08a 100644 --- a/test/transforms/fixtures/insert-inline-at-range/is-empty/input.yaml +++ b/test/transforms/fixtures/insert-inline-at-range/is-empty/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/insert-inline-at-range/is-empty/output.yaml b/test/transforms/fixtures/insert-inline-at-range/is-empty/output.yaml index 4dae542ef..68da1740e 100644 --- a/test/transforms/fixtures/insert-inline-at-range/is-empty/output.yaml +++ b/test/transforms/fixtures/insert-inline-at-range/is-empty/output.yaml @@ -4,5 +4,4 @@ nodes: type: image nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/insert-inline-at-range/is-void/input.yaml b/test/transforms/fixtures/insert-inline-at-range/is-void/input.yaml index 43146f431..1700caf75 100644 --- a/test/transforms/fixtures/insert-inline-at-range/is-void/input.yaml +++ b/test/transforms/fixtures/insert-inline-at-range/is-void/input.yaml @@ -5,5 +5,4 @@ nodes: isVoid: true nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/insert-inline-at-range/is-void/output.yaml b/test/transforms/fixtures/insert-inline-at-range/is-void/output.yaml index 0e9fe0b31..8d6405375 100644 --- a/test/transforms/fixtures/insert-inline-at-range/is-void/output.yaml +++ b/test/transforms/fixtures/insert-inline-at-range/is-void/output.yaml @@ -3,13 +3,8 @@ nodes: - kind: block type: image isVoid: true - nodes: - - kind: text - ranges: - - text: "" - kind: block type: image nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/insert-inline-at-range/with-block/input.yaml b/test/transforms/fixtures/insert-inline-at-range/with-block/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-inline-at-range/with-block/input.yaml +++ b/test/transforms/fixtures/insert-inline-at-range/with-block/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-inline-at-range/with-block/output.yaml b/test/transforms/fixtures/insert-inline-at-range/with-block/output.yaml index 41765e641..bf2ea138a 100644 --- a/test/transforms/fixtures/insert-inline-at-range/with-block/output.yaml +++ b/test/transforms/fixtures/insert-inline-at-range/with-block/output.yaml @@ -4,11 +4,9 @@ nodes: type: image nodes: - kind: text - ranges: - - text: "" + text: "" - kind: block type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-inline-at-range/with-object/input.yaml b/test/transforms/fixtures/insert-inline-at-range/with-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-inline-at-range/with-object/input.yaml +++ b/test/transforms/fixtures/insert-inline-at-range/with-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-inline-at-range/with-object/output.yaml b/test/transforms/fixtures/insert-inline-at-range/with-object/output.yaml index 41765e641..bf2ea138a 100644 --- a/test/transforms/fixtures/insert-inline-at-range/with-object/output.yaml +++ b/test/transforms/fixtures/insert-inline-at-range/with-object/output.yaml @@ -4,11 +4,9 @@ nodes: type: image nodes: - kind: text - ranges: - - text: "" + text: "" - kind: block type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text-at-range/first-character/input.yaml b/test/transforms/fixtures/insert-text-at-range/first-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text-at-range/first-character/input.yaml +++ b/test/transforms/fixtures/insert-text-at-range/first-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text-at-range/first-character/output.yaml b/test/transforms/fixtures/insert-text-at-range/first-character/output.yaml index a373de628..2318b4163 100644 --- a/test/transforms/fixtures/insert-text-at-range/first-character/output.yaml +++ b/test/transforms/fixtures/insert-text-at-range/first-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: aword + text: aword diff --git a/test/transforms/fixtures/insert-text-at-range/first-space/input.yaml b/test/transforms/fixtures/insert-text-at-range/first-space/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text-at-range/first-space/input.yaml +++ b/test/transforms/fixtures/insert-text-at-range/first-space/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text-at-range/first-space/output.yaml b/test/transforms/fixtures/insert-text-at-range/first-space/output.yaml index f994c9653..5369726ee 100644 --- a/test/transforms/fixtures/insert-text-at-range/first-space/output.yaml +++ b/test/transforms/fixtures/insert-text-at-range/first-space/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: " word" + text: " word" diff --git a/test/transforms/fixtures/insert-text-at-range/first-words/input.yaml b/test/transforms/fixtures/insert-text-at-range/first-words/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text-at-range/first-words/input.yaml +++ b/test/transforms/fixtures/insert-text-at-range/first-words/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text-at-range/first-words/output.yaml b/test/transforms/fixtures/insert-text-at-range/first-words/output.yaml index b5278cbc6..c094881b2 100644 --- a/test/transforms/fixtures/insert-text-at-range/first-words/output.yaml +++ b/test/transforms/fixtures/insert-text-at-range/first-words/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: a few words word + text: a few words word diff --git a/test/transforms/fixtures/insert-text-at-range/last-character/input.yaml b/test/transforms/fixtures/insert-text-at-range/last-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text-at-range/last-character/input.yaml +++ b/test/transforms/fixtures/insert-text-at-range/last-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text-at-range/last-character/output.yaml b/test/transforms/fixtures/insert-text-at-range/last-character/output.yaml index ad45f0c9b..27b1b1a0f 100644 --- a/test/transforms/fixtures/insert-text-at-range/last-character/output.yaml +++ b/test/transforms/fixtures/insert-text-at-range/last-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: worda + text: worda diff --git a/test/transforms/fixtures/insert-text-at-range/last-space/input.yaml b/test/transforms/fixtures/insert-text-at-range/last-space/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text-at-range/last-space/input.yaml +++ b/test/transforms/fixtures/insert-text-at-range/last-space/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text-at-range/last-space/output.yaml b/test/transforms/fixtures/insert-text-at-range/last-space/output.yaml index 2061412e0..1158dd582 100644 --- a/test/transforms/fixtures/insert-text-at-range/last-space/output.yaml +++ b/test/transforms/fixtures/insert-text-at-range/last-space/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: "word " + text: "word " diff --git a/test/transforms/fixtures/insert-text-at-range/last-words/input.yaml b/test/transforms/fixtures/insert-text-at-range/last-words/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text-at-range/last-words/input.yaml +++ b/test/transforms/fixtures/insert-text-at-range/last-words/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text-at-range/last-words/output.yaml b/test/transforms/fixtures/insert-text-at-range/last-words/output.yaml index b95f2bb1a..337d252a4 100644 --- a/test/transforms/fixtures/insert-text-at-range/last-words/output.yaml +++ b/test/transforms/fixtures/insert-text-at-range/last-words/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word a few words + text: word a few words diff --git a/test/transforms/fixtures/insert-text-at-range/middle-character/input.yaml b/test/transforms/fixtures/insert-text-at-range/middle-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text-at-range/middle-character/input.yaml +++ b/test/transforms/fixtures/insert-text-at-range/middle-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text-at-range/middle-character/output.yaml b/test/transforms/fixtures/insert-text-at-range/middle-character/output.yaml index b0873c956..7b7f5d987 100644 --- a/test/transforms/fixtures/insert-text-at-range/middle-character/output.yaml +++ b/test/transforms/fixtures/insert-text-at-range/middle-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: waord + text: waord diff --git a/test/transforms/fixtures/insert-text-at-range/middle-space/input.yaml b/test/transforms/fixtures/insert-text-at-range/middle-space/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text-at-range/middle-space/input.yaml +++ b/test/transforms/fixtures/insert-text-at-range/middle-space/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text-at-range/middle-space/output.yaml b/test/transforms/fixtures/insert-text-at-range/middle-space/output.yaml index 8b72a232f..e71a75356 100644 --- a/test/transforms/fixtures/insert-text-at-range/middle-space/output.yaml +++ b/test/transforms/fixtures/insert-text-at-range/middle-space/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w ord + text: w ord diff --git a/test/transforms/fixtures/insert-text-at-range/middle-words/input.yaml b/test/transforms/fixtures/insert-text-at-range/middle-words/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text-at-range/middle-words/input.yaml +++ b/test/transforms/fixtures/insert-text-at-range/middle-words/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text-at-range/middle-words/output.yaml b/test/transforms/fixtures/insert-text-at-range/middle-words/output.yaml index f5df73851..f63d1ff18 100644 --- a/test/transforms/fixtures/insert-text-at-range/middle-words/output.yaml +++ b/test/transforms/fixtures/insert-text-at-range/middle-words/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w a few words ord + text: w a few words ord diff --git a/test/transforms/fixtures/insert-text-at-range/with-marks/input.yaml b/test/transforms/fixtures/insert-text-at-range/with-marks/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text-at-range/with-marks/input.yaml +++ b/test/transforms/fixtures/insert-text-at-range/with-marks/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text/first-character/input.yaml b/test/transforms/fixtures/insert-text/first-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text/first-character/input.yaml +++ b/test/transforms/fixtures/insert-text/first-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text/first-character/output.yaml b/test/transforms/fixtures/insert-text/first-character/output.yaml index a373de628..2318b4163 100644 --- a/test/transforms/fixtures/insert-text/first-character/output.yaml +++ b/test/transforms/fixtures/insert-text/first-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: aword + text: aword diff --git a/test/transforms/fixtures/insert-text/first-space/input.yaml b/test/transforms/fixtures/insert-text/first-space/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text/first-space/input.yaml +++ b/test/transforms/fixtures/insert-text/first-space/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text/first-space/output.yaml b/test/transforms/fixtures/insert-text/first-space/output.yaml index f994c9653..5369726ee 100644 --- a/test/transforms/fixtures/insert-text/first-space/output.yaml +++ b/test/transforms/fixtures/insert-text/first-space/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: " word" + text: " word" diff --git a/test/transforms/fixtures/insert-text/first-words/input.yaml b/test/transforms/fixtures/insert-text/first-words/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text/first-words/input.yaml +++ b/test/transforms/fixtures/insert-text/first-words/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text/first-words/output.yaml b/test/transforms/fixtures/insert-text/first-words/output.yaml index b5278cbc6..c094881b2 100644 --- a/test/transforms/fixtures/insert-text/first-words/output.yaml +++ b/test/transforms/fixtures/insert-text/first-words/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: a few words word + text: a few words word diff --git a/test/transforms/fixtures/insert-text/last-character/input.yaml b/test/transforms/fixtures/insert-text/last-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text/last-character/input.yaml +++ b/test/transforms/fixtures/insert-text/last-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text/last-character/output.yaml b/test/transforms/fixtures/insert-text/last-character/output.yaml index ad45f0c9b..27b1b1a0f 100644 --- a/test/transforms/fixtures/insert-text/last-character/output.yaml +++ b/test/transforms/fixtures/insert-text/last-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: worda + text: worda diff --git a/test/transforms/fixtures/insert-text/last-space/input.yaml b/test/transforms/fixtures/insert-text/last-space/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text/last-space/input.yaml +++ b/test/transforms/fixtures/insert-text/last-space/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text/last-space/output.yaml b/test/transforms/fixtures/insert-text/last-space/output.yaml index 2061412e0..1158dd582 100644 --- a/test/transforms/fixtures/insert-text/last-space/output.yaml +++ b/test/transforms/fixtures/insert-text/last-space/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: "word " + text: "word " diff --git a/test/transforms/fixtures/insert-text/last-words/input.yaml b/test/transforms/fixtures/insert-text/last-words/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text/last-words/input.yaml +++ b/test/transforms/fixtures/insert-text/last-words/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text/last-words/output.yaml b/test/transforms/fixtures/insert-text/last-words/output.yaml index b95f2bb1a..337d252a4 100644 --- a/test/transforms/fixtures/insert-text/last-words/output.yaml +++ b/test/transforms/fixtures/insert-text/last-words/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word a few words + text: word a few words diff --git a/test/transforms/fixtures/insert-text/middle-character/input.yaml b/test/transforms/fixtures/insert-text/middle-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text/middle-character/input.yaml +++ b/test/transforms/fixtures/insert-text/middle-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text/middle-character/output.yaml b/test/transforms/fixtures/insert-text/middle-character/output.yaml index b0873c956..7b7f5d987 100644 --- a/test/transforms/fixtures/insert-text/middle-character/output.yaml +++ b/test/transforms/fixtures/insert-text/middle-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: waord + text: waord diff --git a/test/transforms/fixtures/insert-text/middle-space/input.yaml b/test/transforms/fixtures/insert-text/middle-space/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text/middle-space/input.yaml +++ b/test/transforms/fixtures/insert-text/middle-space/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text/middle-space/output.yaml b/test/transforms/fixtures/insert-text/middle-space/output.yaml index 8b72a232f..e71a75356 100644 --- a/test/transforms/fixtures/insert-text/middle-space/output.yaml +++ b/test/transforms/fixtures/insert-text/middle-space/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w ord + text: w ord diff --git a/test/transforms/fixtures/insert-text/middle-words/input.yaml b/test/transforms/fixtures/insert-text/middle-words/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text/middle-words/input.yaml +++ b/test/transforms/fixtures/insert-text/middle-words/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/insert-text/middle-words/output.yaml b/test/transforms/fixtures/insert-text/middle-words/output.yaml index f5df73851..f63d1ff18 100644 --- a/test/transforms/fixtures/insert-text/middle-words/output.yaml +++ b/test/transforms/fixtures/insert-text/middle-words/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w a few words ord + text: w a few words ord diff --git a/test/transforms/fixtures/insert-text/with-marks/input.yaml b/test/transforms/fixtures/insert-text/with-marks/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/insert-text/with-marks/input.yaml +++ b/test/transforms/fixtures/insert-text/with-marks/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/remove-mark-at-range/whole-word/output.yaml b/test/transforms/fixtures/remove-mark-at-range/whole-word/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/remove-mark-at-range/whole-word/output.yaml +++ b/test/transforms/fixtures/remove-mark-at-range/whole-word/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/remove-mark-at-range/with-mark-object/output.yaml b/test/transforms/fixtures/remove-mark-at-range/with-mark-object/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/remove-mark-at-range/with-mark-object/output.yaml +++ b/test/transforms/fixtures/remove-mark-at-range/with-mark-object/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/remove-mark-at-range/with-plain-object/output.yaml b/test/transforms/fixtures/remove-mark-at-range/with-plain-object/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/remove-mark-at-range/with-plain-object/output.yaml +++ b/test/transforms/fixtures/remove-mark-at-range/with-plain-object/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/remove-mark/across-blocks/output.yaml b/test/transforms/fixtures/remove-mark/across-blocks/output.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/remove-mark/across-blocks/output.yaml +++ b/test/transforms/fixtures/remove-mark/across-blocks/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/remove-mark/across-inlines/output.yaml b/test/transforms/fixtures/remove-mark/across-inlines/output.yaml index c31f583e3..2568c6b66 100644 --- a/test/transforms/fixtures/remove-mark/across-inlines/output.yaml +++ b/test/transforms/fixtures/remove-mark/across-inlines/output.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/remove-mark/collapsed-selection/input.yaml b/test/transforms/fixtures/remove-mark/collapsed-selection/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/remove-mark/collapsed-selection/input.yaml +++ b/test/transforms/fixtures/remove-mark/collapsed-selection/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/remove-mark/collapsed-selection/output.yaml b/test/transforms/fixtures/remove-mark/collapsed-selection/output.yaml index a373de628..2318b4163 100644 --- a/test/transforms/fixtures/remove-mark/collapsed-selection/output.yaml +++ b/test/transforms/fixtures/remove-mark/collapsed-selection/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: aword + text: aword diff --git a/test/transforms/fixtures/remove-mark/first-character/output.yaml b/test/transforms/fixtures/remove-mark/first-character/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/remove-mark/first-character/output.yaml +++ b/test/transforms/fixtures/remove-mark/first-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/remove-mark/last-character/output.yaml b/test/transforms/fixtures/remove-mark/last-character/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/remove-mark/last-character/output.yaml +++ b/test/transforms/fixtures/remove-mark/last-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/remove-mark/middle-character/output.yaml b/test/transforms/fixtures/remove-mark/middle-character/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/remove-mark/middle-character/output.yaml +++ b/test/transforms/fixtures/remove-mark/middle-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/remove-mark/whole-word/output.yaml b/test/transforms/fixtures/remove-mark/whole-word/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/remove-mark/whole-word/output.yaml +++ b/test/transforms/fixtures/remove-mark/whole-word/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/remove-mark/with-mark-object/output.yaml b/test/transforms/fixtures/remove-mark/with-mark-object/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/remove-mark/with-mark-object/output.yaml +++ b/test/transforms/fixtures/remove-mark/with-mark-object/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/remove-mark/with-plain-object/output.yaml b/test/transforms/fixtures/remove-mark/with-plain-object/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/remove-mark/with-plain-object/output.yaml +++ b/test/transforms/fixtures/remove-mark/with-plain-object/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/remove-node-by-key/block/input.yaml b/test/transforms/fixtures/remove-node-by-key/block/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/remove-node-by-key/block/input.yaml +++ b/test/transforms/fixtures/remove-node-by-key/block/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/remove-node-by-key/block/output.yaml b/test/transforms/fixtures/remove-node-by-key/block/output.yaml index 103657fda..6c07a315f 100644 --- a/test/transforms/fixtures/remove-node-by-key/block/output.yaml +++ b/test/transforms/fixtures/remove-node-by-key/block/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/remove-node-by-key/inline/input.yaml b/test/transforms/fixtures/remove-node-by-key/inline/input.yaml index 877fc950a..c17ccbcf2 100644 --- a/test/transforms/fixtures/remove-node-by-key/inline/input.yaml +++ b/test/transforms/fixtures/remove-node-by-key/inline/input.yaml @@ -7,11 +7,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: inline type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/remove-node-by-key/inline/output.yaml b/test/transforms/fixtures/remove-node-by-key/inline/output.yaml index 673e51833..df7991b4d 100644 --- a/test/transforms/fixtures/remove-node-by-key/inline/output.yaml +++ b/test/transforms/fixtures/remove-node-by-key/inline/output.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/remove-node-by-key/text/input.yaml b/test/transforms/fixtures/remove-node-by-key/text/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/remove-node-by-key/text/input.yaml +++ b/test/transforms/fixtures/remove-node-by-key/text/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/remove-node-by-key/text/output.yaml b/test/transforms/fixtures/remove-node-by-key/text/output.yaml index a1bc55c38..f6de4d08a 100644 --- a/test/transforms/fixtures/remove-node-by-key/text/output.yaml +++ b/test/transforms/fixtures/remove-node-by-key/text/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/set-block-at-range/across-blocks/input.yaml b/test/transforms/fixtures/set-block-at-range/across-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/set-block-at-range/across-blocks/input.yaml +++ b/test/transforms/fixtures/set-block-at-range/across-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/set-block-at-range/across-blocks/output.yaml b/test/transforms/fixtures/set-block-at-range/across-blocks/output.yaml index 885a28729..802d852d1 100644 --- a/test/transforms/fixtures/set-block-at-range/across-blocks/output.yaml +++ b/test/transforms/fixtures/set-block-at-range/across-blocks/output.yaml @@ -4,11 +4,9 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: code nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/set-block-at-range/across-inlines/input.yaml b/test/transforms/fixtures/set-block-at-range/across-inlines/input.yaml index c31f583e3..2568c6b66 100644 --- a/test/transforms/fixtures/set-block-at-range/across-inlines/input.yaml +++ b/test/transforms/fixtures/set-block-at-range/across-inlines/input.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/set-block-at-range/across-inlines/output.yaml b/test/transforms/fixtures/set-block-at-range/across-inlines/output.yaml index 33daef92b..886e1ad23 100644 --- a/test/transforms/fixtures/set-block-at-range/across-inlines/output.yaml +++ b/test/transforms/fixtures/set-block-at-range/across-inlines/output.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: code nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/set-block-at-range/data-only/input.yaml b/test/transforms/fixtures/set-block-at-range/data-only/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/set-block-at-range/data-only/input.yaml +++ b/test/transforms/fixtures/set-block-at-range/data-only/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block-at-range/data-only/output.yaml b/test/transforms/fixtures/set-block-at-range/data-only/output.yaml index 591f9d1e1..d7a483a8d 100644 --- a/test/transforms/fixtures/set-block-at-range/data-only/output.yaml +++ b/test/transforms/fixtures/set-block-at-range/data-only/output.yaml @@ -6,5 +6,4 @@ nodes: key: value nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block-at-range/nested-block/input.yaml b/test/transforms/fixtures/set-block-at-range/nested-block/input.yaml index ae0ad40e5..94f99a71d 100644 --- a/test/transforms/fixtures/set-block-at-range/nested-block/input.yaml +++ b/test/transforms/fixtures/set-block-at-range/nested-block/input.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block-at-range/nested-block/output.yaml b/test/transforms/fixtures/set-block-at-range/nested-block/output.yaml index 9b66aa6c3..cce6d8a73 100644 --- a/test/transforms/fixtures/set-block-at-range/nested-block/output.yaml +++ b/test/transforms/fixtures/set-block-at-range/nested-block/output.yaml @@ -7,5 +7,4 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block-at-range/single-block-string-shorthand/input.yaml b/test/transforms/fixtures/set-block-at-range/single-block-string-shorthand/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/set-block-at-range/single-block-string-shorthand/input.yaml +++ b/test/transforms/fixtures/set-block-at-range/single-block-string-shorthand/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block-at-range/single-block-string-shorthand/output.yaml b/test/transforms/fixtures/set-block-at-range/single-block-string-shorthand/output.yaml index e20ab29e7..207755a79 100644 --- a/test/transforms/fixtures/set-block-at-range/single-block-string-shorthand/output.yaml +++ b/test/transforms/fixtures/set-block-at-range/single-block-string-shorthand/output.yaml @@ -4,5 +4,4 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block-at-range/single-block/input.yaml b/test/transforms/fixtures/set-block-at-range/single-block/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/set-block-at-range/single-block/input.yaml +++ b/test/transforms/fixtures/set-block-at-range/single-block/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block-at-range/single-block/output.yaml b/test/transforms/fixtures/set-block-at-range/single-block/output.yaml index e20ab29e7..207755a79 100644 --- a/test/transforms/fixtures/set-block-at-range/single-block/output.yaml +++ b/test/transforms/fixtures/set-block-at-range/single-block/output.yaml @@ -4,5 +4,4 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block-at-range/with-data-object/input.yaml b/test/transforms/fixtures/set-block-at-range/with-data-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/set-block-at-range/with-data-object/input.yaml +++ b/test/transforms/fixtures/set-block-at-range/with-data-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block-at-range/with-data-object/output.yaml b/test/transforms/fixtures/set-block-at-range/with-data-object/output.yaml index f56d4e280..fa113ecd9 100644 --- a/test/transforms/fixtures/set-block-at-range/with-data-object/output.yaml +++ b/test/transforms/fixtures/set-block-at-range/with-data-object/output.yaml @@ -6,5 +6,4 @@ nodes: key: value nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block-at-range/with-data/input.yaml b/test/transforms/fixtures/set-block-at-range/with-data/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/set-block-at-range/with-data/input.yaml +++ b/test/transforms/fixtures/set-block-at-range/with-data/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block-at-range/with-data/output.yaml b/test/transforms/fixtures/set-block-at-range/with-data/output.yaml index f56d4e280..fa113ecd9 100644 --- a/test/transforms/fixtures/set-block-at-range/with-data/output.yaml +++ b/test/transforms/fixtures/set-block-at-range/with-data/output.yaml @@ -6,5 +6,4 @@ nodes: key: value nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block-at-range/with-is-void/input.yaml b/test/transforms/fixtures/set-block-at-range/with-is-void/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/set-block-at-range/with-is-void/input.yaml +++ b/test/transforms/fixtures/set-block-at-range/with-is-void/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block-at-range/with-is-void/output.yaml b/test/transforms/fixtures/set-block-at-range/with-is-void/output.yaml index 43146f431..8246cfbed 100644 --- a/test/transforms/fixtures/set-block-at-range/with-is-void/output.yaml +++ b/test/transforms/fixtures/set-block-at-range/with-is-void/output.yaml @@ -3,7 +3,3 @@ nodes: - kind: block type: image isVoid: true - nodes: - - kind: text - ranges: - - text: "" diff --git a/test/transforms/fixtures/set-block/across-blocks/input.yaml b/test/transforms/fixtures/set-block/across-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/set-block/across-blocks/input.yaml +++ b/test/transforms/fixtures/set-block/across-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/set-block/across-blocks/output.yaml b/test/transforms/fixtures/set-block/across-blocks/output.yaml index 885a28729..802d852d1 100644 --- a/test/transforms/fixtures/set-block/across-blocks/output.yaml +++ b/test/transforms/fixtures/set-block/across-blocks/output.yaml @@ -4,11 +4,9 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: code nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/set-block/across-inlines/input.yaml b/test/transforms/fixtures/set-block/across-inlines/input.yaml index c31f583e3..2568c6b66 100644 --- a/test/transforms/fixtures/set-block/across-inlines/input.yaml +++ b/test/transforms/fixtures/set-block/across-inlines/input.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/set-block/across-inlines/output.yaml b/test/transforms/fixtures/set-block/across-inlines/output.yaml index 33daef92b..886e1ad23 100644 --- a/test/transforms/fixtures/set-block/across-inlines/output.yaml +++ b/test/transforms/fixtures/set-block/across-inlines/output.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: code nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/set-block/data-only/input.yaml b/test/transforms/fixtures/set-block/data-only/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/set-block/data-only/input.yaml +++ b/test/transforms/fixtures/set-block/data-only/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block/data-only/output.yaml b/test/transforms/fixtures/set-block/data-only/output.yaml index 591f9d1e1..d7a483a8d 100644 --- a/test/transforms/fixtures/set-block/data-only/output.yaml +++ b/test/transforms/fixtures/set-block/data-only/output.yaml @@ -6,5 +6,4 @@ nodes: key: value nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block/nested-block/input.yaml b/test/transforms/fixtures/set-block/nested-block/input.yaml index ae0ad40e5..94f99a71d 100644 --- a/test/transforms/fixtures/set-block/nested-block/input.yaml +++ b/test/transforms/fixtures/set-block/nested-block/input.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block/nested-block/output.yaml b/test/transforms/fixtures/set-block/nested-block/output.yaml index 9b66aa6c3..cce6d8a73 100644 --- a/test/transforms/fixtures/set-block/nested-block/output.yaml +++ b/test/transforms/fixtures/set-block/nested-block/output.yaml @@ -7,5 +7,4 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block/single-block-string-shorthand/input.yaml b/test/transforms/fixtures/set-block/single-block-string-shorthand/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/set-block/single-block-string-shorthand/input.yaml +++ b/test/transforms/fixtures/set-block/single-block-string-shorthand/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block/single-block-string-shorthand/output.yaml b/test/transforms/fixtures/set-block/single-block-string-shorthand/output.yaml index e20ab29e7..207755a79 100644 --- a/test/transforms/fixtures/set-block/single-block-string-shorthand/output.yaml +++ b/test/transforms/fixtures/set-block/single-block-string-shorthand/output.yaml @@ -4,5 +4,4 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block/single-block/input.yaml b/test/transforms/fixtures/set-block/single-block/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/set-block/single-block/input.yaml +++ b/test/transforms/fixtures/set-block/single-block/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block/single-block/output.yaml b/test/transforms/fixtures/set-block/single-block/output.yaml index e20ab29e7..207755a79 100644 --- a/test/transforms/fixtures/set-block/single-block/output.yaml +++ b/test/transforms/fixtures/set-block/single-block/output.yaml @@ -4,5 +4,4 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block/with-data-object/input.yaml b/test/transforms/fixtures/set-block/with-data-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/set-block/with-data-object/input.yaml +++ b/test/transforms/fixtures/set-block/with-data-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block/with-data-object/output.yaml b/test/transforms/fixtures/set-block/with-data-object/output.yaml index f56d4e280..fa113ecd9 100644 --- a/test/transforms/fixtures/set-block/with-data-object/output.yaml +++ b/test/transforms/fixtures/set-block/with-data-object/output.yaml @@ -6,5 +6,4 @@ nodes: key: value nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block/with-data/input.yaml b/test/transforms/fixtures/set-block/with-data/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/set-block/with-data/input.yaml +++ b/test/transforms/fixtures/set-block/with-data/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block/with-data/output.yaml b/test/transforms/fixtures/set-block/with-data/output.yaml index f56d4e280..fa113ecd9 100644 --- a/test/transforms/fixtures/set-block/with-data/output.yaml +++ b/test/transforms/fixtures/set-block/with-data/output.yaml @@ -6,5 +6,4 @@ nodes: key: value nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block/with-is-void/input.yaml b/test/transforms/fixtures/set-block/with-is-void/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/set-block/with-is-void/input.yaml +++ b/test/transforms/fixtures/set-block/with-is-void/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-block/with-is-void/output.yaml b/test/transforms/fixtures/set-block/with-is-void/output.yaml index 43146f431..8246cfbed 100644 --- a/test/transforms/fixtures/set-block/with-is-void/output.yaml +++ b/test/transforms/fixtures/set-block/with-is-void/output.yaml @@ -3,7 +3,3 @@ nodes: - kind: block type: image isVoid: true - nodes: - - kind: text - ranges: - - text: "" diff --git a/test/transforms/fixtures/set-inline-at-range/across-inlines/input.yaml b/test/transforms/fixtures/set-inline-at-range/across-inlines/input.yaml index c31f583e3..2568c6b66 100644 --- a/test/transforms/fixtures/set-inline-at-range/across-inlines/input.yaml +++ b/test/transforms/fixtures/set-inline-at-range/across-inlines/input.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/set-inline-at-range/across-inlines/output.yaml b/test/transforms/fixtures/set-inline-at-range/across-inlines/output.yaml index 4263a23c5..213d5d4d0 100644 --- a/test/transforms/fixtures/set-inline-at-range/across-inlines/output.yaml +++ b/test/transforms/fixtures/set-inline-at-range/across-inlines/output.yaml @@ -7,8 +7,7 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: code nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/set-inline-at-range/data-only/input.yaml b/test/transforms/fixtures/set-inline-at-range/data-only/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/set-inline-at-range/data-only/input.yaml +++ b/test/transforms/fixtures/set-inline-at-range/data-only/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline-at-range/data-only/output.yaml b/test/transforms/fixtures/set-inline-at-range/data-only/output.yaml index 8dc03cf88..9dca59f2e 100644 --- a/test/transforms/fixtures/set-inline-at-range/data-only/output.yaml +++ b/test/transforms/fixtures/set-inline-at-range/data-only/output.yaml @@ -9,5 +9,4 @@ nodes: key: value nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline-at-range/nested-inline/input.yaml b/test/transforms/fixtures/set-inline-at-range/nested-inline/input.yaml index 6ed138519..6d5ef6ffe 100644 --- a/test/transforms/fixtures/set-inline-at-range/nested-inline/input.yaml +++ b/test/transforms/fixtures/set-inline-at-range/nested-inline/input.yaml @@ -10,5 +10,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline-at-range/nested-inline/output.yaml b/test/transforms/fixtures/set-inline-at-range/nested-inline/output.yaml index b1b7e276e..92e1191ee 100644 --- a/test/transforms/fixtures/set-inline-at-range/nested-inline/output.yaml +++ b/test/transforms/fixtures/set-inline-at-range/nested-inline/output.yaml @@ -10,5 +10,4 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline-at-range/single-inline-string-shorthand/input.yaml b/test/transforms/fixtures/set-inline-at-range/single-inline-string-shorthand/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/set-inline-at-range/single-inline-string-shorthand/input.yaml +++ b/test/transforms/fixtures/set-inline-at-range/single-inline-string-shorthand/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline-at-range/single-inline-string-shorthand/output.yaml b/test/transforms/fixtures/set-inline-at-range/single-inline-string-shorthand/output.yaml index 5db5042f6..ce1ccbc2b 100644 --- a/test/transforms/fixtures/set-inline-at-range/single-inline-string-shorthand/output.yaml +++ b/test/transforms/fixtures/set-inline-at-range/single-inline-string-shorthand/output.yaml @@ -7,5 +7,4 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline-at-range/single-inline/input.yaml b/test/transforms/fixtures/set-inline-at-range/single-inline/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/set-inline-at-range/single-inline/input.yaml +++ b/test/transforms/fixtures/set-inline-at-range/single-inline/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline-at-range/single-inline/output.yaml b/test/transforms/fixtures/set-inline-at-range/single-inline/output.yaml index 5db5042f6..ce1ccbc2b 100644 --- a/test/transforms/fixtures/set-inline-at-range/single-inline/output.yaml +++ b/test/transforms/fixtures/set-inline-at-range/single-inline/output.yaml @@ -7,5 +7,4 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline-at-range/with-data-object/input.yaml b/test/transforms/fixtures/set-inline-at-range/with-data-object/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/set-inline-at-range/with-data-object/input.yaml +++ b/test/transforms/fixtures/set-inline-at-range/with-data-object/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline-at-range/with-data-object/output.yaml b/test/transforms/fixtures/set-inline-at-range/with-data-object/output.yaml index 0e2088cd8..f8e56c7ce 100644 --- a/test/transforms/fixtures/set-inline-at-range/with-data-object/output.yaml +++ b/test/transforms/fixtures/set-inline-at-range/with-data-object/output.yaml @@ -9,5 +9,4 @@ nodes: key: value nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline-at-range/with-data/input.yaml b/test/transforms/fixtures/set-inline-at-range/with-data/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/set-inline-at-range/with-data/input.yaml +++ b/test/transforms/fixtures/set-inline-at-range/with-data/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline-at-range/with-data/output.yaml b/test/transforms/fixtures/set-inline-at-range/with-data/output.yaml index 0e2088cd8..f8e56c7ce 100644 --- a/test/transforms/fixtures/set-inline-at-range/with-data/output.yaml +++ b/test/transforms/fixtures/set-inline-at-range/with-data/output.yaml @@ -9,5 +9,4 @@ nodes: key: value nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline-at-range/with-is-void/input.yaml b/test/transforms/fixtures/set-inline-at-range/with-is-void/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/set-inline-at-range/with-is-void/input.yaml +++ b/test/transforms/fixtures/set-inline-at-range/with-is-void/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline-at-range/with-is-void/output.yaml b/test/transforms/fixtures/set-inline-at-range/with-is-void/output.yaml index 1a0304231..07e15441b 100644 --- a/test/transforms/fixtures/set-inline-at-range/with-is-void/output.yaml +++ b/test/transforms/fixtures/set-inline-at-range/with-is-void/output.yaml @@ -6,7 +6,3 @@ nodes: - kind: inline type: emoji isVoid: true - nodes: - - kind: text - ranges: - - text: "" diff --git a/test/transforms/fixtures/set-inline/across-inlines/input.yaml b/test/transforms/fixtures/set-inline/across-inlines/input.yaml index c31f583e3..2568c6b66 100644 --- a/test/transforms/fixtures/set-inline/across-inlines/input.yaml +++ b/test/transforms/fixtures/set-inline/across-inlines/input.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/set-inline/across-inlines/output.yaml b/test/transforms/fixtures/set-inline/across-inlines/output.yaml index 4263a23c5..213d5d4d0 100644 --- a/test/transforms/fixtures/set-inline/across-inlines/output.yaml +++ b/test/transforms/fixtures/set-inline/across-inlines/output.yaml @@ -7,8 +7,7 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: code nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/set-inline/data-only/input.yaml b/test/transforms/fixtures/set-inline/data-only/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/set-inline/data-only/input.yaml +++ b/test/transforms/fixtures/set-inline/data-only/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline/data-only/output.yaml b/test/transforms/fixtures/set-inline/data-only/output.yaml index 8dc03cf88..9dca59f2e 100644 --- a/test/transforms/fixtures/set-inline/data-only/output.yaml +++ b/test/transforms/fixtures/set-inline/data-only/output.yaml @@ -9,5 +9,4 @@ nodes: key: value nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline/nested-inline/input.yaml b/test/transforms/fixtures/set-inline/nested-inline/input.yaml index 6ed138519..6d5ef6ffe 100644 --- a/test/transforms/fixtures/set-inline/nested-inline/input.yaml +++ b/test/transforms/fixtures/set-inline/nested-inline/input.yaml @@ -10,5 +10,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline/nested-inline/output.yaml b/test/transforms/fixtures/set-inline/nested-inline/output.yaml index b1b7e276e..92e1191ee 100644 --- a/test/transforms/fixtures/set-inline/nested-inline/output.yaml +++ b/test/transforms/fixtures/set-inline/nested-inline/output.yaml @@ -10,5 +10,4 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline/single-inline-string-shorthand/input.yaml b/test/transforms/fixtures/set-inline/single-inline-string-shorthand/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/set-inline/single-inline-string-shorthand/input.yaml +++ b/test/transforms/fixtures/set-inline/single-inline-string-shorthand/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline/single-inline-string-shorthand/output.yaml b/test/transforms/fixtures/set-inline/single-inline-string-shorthand/output.yaml index 5db5042f6..ce1ccbc2b 100644 --- a/test/transforms/fixtures/set-inline/single-inline-string-shorthand/output.yaml +++ b/test/transforms/fixtures/set-inline/single-inline-string-shorthand/output.yaml @@ -7,5 +7,4 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline/single-inline/input.yaml b/test/transforms/fixtures/set-inline/single-inline/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/set-inline/single-inline/input.yaml +++ b/test/transforms/fixtures/set-inline/single-inline/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline/single-inline/output.yaml b/test/transforms/fixtures/set-inline/single-inline/output.yaml index 5db5042f6..ce1ccbc2b 100644 --- a/test/transforms/fixtures/set-inline/single-inline/output.yaml +++ b/test/transforms/fixtures/set-inline/single-inline/output.yaml @@ -7,5 +7,4 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline/with-data-object/input.yaml b/test/transforms/fixtures/set-inline/with-data-object/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/set-inline/with-data-object/input.yaml +++ b/test/transforms/fixtures/set-inline/with-data-object/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline/with-data-object/output.yaml b/test/transforms/fixtures/set-inline/with-data-object/output.yaml index 0e2088cd8..f8e56c7ce 100644 --- a/test/transforms/fixtures/set-inline/with-data-object/output.yaml +++ b/test/transforms/fixtures/set-inline/with-data-object/output.yaml @@ -9,5 +9,4 @@ nodes: key: value nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline/with-data/input.yaml b/test/transforms/fixtures/set-inline/with-data/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/set-inline/with-data/input.yaml +++ b/test/transforms/fixtures/set-inline/with-data/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline/with-data/output.yaml b/test/transforms/fixtures/set-inline/with-data/output.yaml index 0e2088cd8..f8e56c7ce 100644 --- a/test/transforms/fixtures/set-inline/with-data/output.yaml +++ b/test/transforms/fixtures/set-inline/with-data/output.yaml @@ -9,5 +9,4 @@ nodes: key: value nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline/with-is-void/input.yaml b/test/transforms/fixtures/set-inline/with-is-void/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/set-inline/with-is-void/input.yaml +++ b/test/transforms/fixtures/set-inline/with-is-void/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-inline/with-is-void/output.yaml b/test/transforms/fixtures/set-inline/with-is-void/output.yaml index 1a0304231..07e15441b 100644 --- a/test/transforms/fixtures/set-inline/with-is-void/output.yaml +++ b/test/transforms/fixtures/set-inline/with-is-void/output.yaml @@ -6,7 +6,3 @@ nodes: - kind: inline type: emoji isVoid: true - nodes: - - kind: text - ranges: - - text: "" diff --git a/test/transforms/fixtures/set-node-by-key/single-block-string-shorthand/input.yaml b/test/transforms/fixtures/set-node-by-key/single-block-string-shorthand/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/set-node-by-key/single-block-string-shorthand/input.yaml +++ b/test/transforms/fixtures/set-node-by-key/single-block-string-shorthand/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-node-by-key/single-block-string-shorthand/output.yaml b/test/transforms/fixtures/set-node-by-key/single-block-string-shorthand/output.yaml index e20ab29e7..207755a79 100644 --- a/test/transforms/fixtures/set-node-by-key/single-block-string-shorthand/output.yaml +++ b/test/transforms/fixtures/set-node-by-key/single-block-string-shorthand/output.yaml @@ -4,5 +4,4 @@ nodes: type: code nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-node-by-key/single-block/input.yaml b/test/transforms/fixtures/set-node-by-key/single-block/input.yaml index 17341a79a..6967ff0b0 100644 --- a/test/transforms/fixtures/set-node-by-key/single-block/input.yaml +++ b/test/transforms/fixtures/set-node-by-key/single-block/input.yaml @@ -6,5 +6,4 @@ nodes: key: foo nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/set-node-by-key/single-block/output.yaml b/test/transforms/fixtures/set-node-by-key/single-block/output.yaml index 35fe3b170..8e4002995 100644 --- a/test/transforms/fixtures/set-node-by-key/single-block/output.yaml +++ b/test/transforms/fixtures/set-node-by-key/single-block/output.yaml @@ -6,5 +6,4 @@ nodes: key: bar nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-block-at-range/block-end/input.yaml b/test/transforms/fixtures/split-block-at-range/block-end/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/split-block-at-range/block-end/input.yaml +++ b/test/transforms/fixtures/split-block-at-range/block-end/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/split-block-at-range/block-end/output.yaml b/test/transforms/fixtures/split-block-at-range/block-end/output.yaml index ca253468f..82f9338fb 100644 --- a/test/transforms/fixtures/split-block-at-range/block-end/output.yaml +++ b/test/transforms/fixtures/split-block-at-range/block-end/output.yaml @@ -4,17 +4,14 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: "" + text: "" - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/split-block-at-range/block-middle/input.yaml b/test/transforms/fixtures/split-block-at-range/block-middle/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/split-block-at-range/block-middle/input.yaml +++ b/test/transforms/fixtures/split-block-at-range/block-middle/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-block-at-range/block-middle/output.yaml b/test/transforms/fixtures/split-block-at-range/block-middle/output.yaml index 0537306d5..a79c2ea0b 100644 --- a/test/transforms/fixtures/split-block-at-range/block-middle/output.yaml +++ b/test/transforms/fixtures/split-block-at-range/block-middle/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wo + text: wo - kind: block type: paragraph nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/split-block-at-range/block-start/input.yaml b/test/transforms/fixtures/split-block-at-range/block-start/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/split-block-at-range/block-start/input.yaml +++ b/test/transforms/fixtures/split-block-at-range/block-start/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/split-block-at-range/block-start/output.yaml b/test/transforms/fixtures/split-block-at-range/block-start/output.yaml index ca253468f..82f9338fb 100644 --- a/test/transforms/fixtures/split-block-at-range/block-start/output.yaml +++ b/test/transforms/fixtures/split-block-at-range/block-start/output.yaml @@ -4,17 +4,14 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: "" + text: "" - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/split-block-at-range/depth/input.yaml b/test/transforms/fixtures/split-block-at-range/depth/input.yaml index d1f658170..577eb8b0b 100644 --- a/test/transforms/fixtures/split-block-at-range/depth/input.yaml +++ b/test/transforms/fixtures/split-block-at-range/depth/input.yaml @@ -10,5 +10,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-block-at-range/depth/output.yaml b/test/transforms/fixtures/split-block-at-range/depth/output.yaml index 951fe547b..145f63ff8 100644 --- a/test/transforms/fixtures/split-block-at-range/depth/output.yaml +++ b/test/transforms/fixtures/split-block-at-range/depth/output.yaml @@ -10,8 +10,7 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wo + text: wo - kind: block type: paragraph nodes: @@ -22,5 +21,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/split-block-at-range/with-delete-across-blocks-and-inlines/input.yaml b/test/transforms/fixtures/split-block-at-range/with-delete-across-blocks-and-inlines/input.yaml index f302fa89a..9d4daa75a 100644 --- a/test/transforms/fixtures/split-block-at-range/with-delete-across-blocks-and-inlines/input.yaml +++ b/test/transforms/fixtures/split-block-at-range/with-delete-across-blocks-and-inlines/input.yaml @@ -7,8 +7,7 @@ nodes: type: one nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: two nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/split-block-at-range/with-delete-across-blocks-and-inlines/output.yaml b/test/transforms/fixtures/split-block-at-range/with-delete-across-blocks-and-inlines/output.yaml index 68e8a525b..ee19749e5 100644 --- a/test/transforms/fixtures/split-block-at-range/with-delete-across-blocks-and-inlines/output.yaml +++ b/test/transforms/fixtures/split-block-at-range/with-delete-across-blocks-and-inlines/output.yaml @@ -7,8 +7,7 @@ nodes: type: one nodes: - kind: text - ranges: - - text: wo + text: wo - kind: block type: paragraph nodes: @@ -16,11 +15,9 @@ nodes: type: one nodes: - kind: text - ranges: - - text: "" + text: "" - kind: inline type: two nodes: - kind: text - ranges: - - text: other + text: other diff --git a/test/transforms/fixtures/split-block-at-range/with-delete-across-blocks/input.yaml b/test/transforms/fixtures/split-block-at-range/with-delete-across-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/split-block-at-range/with-delete-across-blocks/input.yaml +++ b/test/transforms/fixtures/split-block-at-range/with-delete-across-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/split-block-at-range/with-delete-across-blocks/output.yaml b/test/transforms/fixtures/split-block-at-range/with-delete-across-blocks/output.yaml index 69c1496d9..3f71c0a8d 100644 --- a/test/transforms/fixtures/split-block-at-range/with-delete-across-blocks/output.yaml +++ b/test/transforms/fixtures/split-block-at-range/with-delete-across-blocks/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wo + text: wo - kind: block type: paragraph nodes: - kind: text - ranges: - - text: other + text: other diff --git a/test/transforms/fixtures/split-block-at-range/with-delete/input.yaml b/test/transforms/fixtures/split-block-at-range/with-delete/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/split-block-at-range/with-delete/input.yaml +++ b/test/transforms/fixtures/split-block-at-range/with-delete/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-block-at-range/with-delete/output.yaml b/test/transforms/fixtures/split-block-at-range/with-delete/output.yaml index 58febc8d5..fc03093ab 100644 --- a/test/transforms/fixtures/split-block-at-range/with-delete/output.yaml +++ b/test/transforms/fixtures/split-block-at-range/with-delete/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: block type: paragraph nodes: - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/split-block-at-range/with-inline/input.yaml b/test/transforms/fixtures/split-block-at-range/with-inline/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/split-block-at-range/with-inline/input.yaml +++ b/test/transforms/fixtures/split-block-at-range/with-inline/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-block-at-range/with-inline/output.yaml b/test/transforms/fixtures/split-block-at-range/with-inline/output.yaml index e48953921..f87391c2b 100644 --- a/test/transforms/fixtures/split-block-at-range/with-inline/output.yaml +++ b/test/transforms/fixtures/split-block-at-range/with-inline/output.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/split-block/block-end/input.yaml b/test/transforms/fixtures/split-block/block-end/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/split-block/block-end/input.yaml +++ b/test/transforms/fixtures/split-block/block-end/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/split-block/block-end/output.yaml b/test/transforms/fixtures/split-block/block-end/output.yaml index ca253468f..82f9338fb 100644 --- a/test/transforms/fixtures/split-block/block-end/output.yaml +++ b/test/transforms/fixtures/split-block/block-end/output.yaml @@ -4,17 +4,14 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: "" + text: "" - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/split-block/block-middle/input.yaml b/test/transforms/fixtures/split-block/block-middle/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/split-block/block-middle/input.yaml +++ b/test/transforms/fixtures/split-block/block-middle/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-block/block-middle/output.yaml b/test/transforms/fixtures/split-block/block-middle/output.yaml index 0537306d5..a79c2ea0b 100644 --- a/test/transforms/fixtures/split-block/block-middle/output.yaml +++ b/test/transforms/fixtures/split-block/block-middle/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wo + text: wo - kind: block type: paragraph nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/split-block/block-start/input.yaml b/test/transforms/fixtures/split-block/block-start/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/split-block/block-start/input.yaml +++ b/test/transforms/fixtures/split-block/block-start/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/split-block/block-start/output.yaml b/test/transforms/fixtures/split-block/block-start/output.yaml index ca253468f..82f9338fb 100644 --- a/test/transforms/fixtures/split-block/block-start/output.yaml +++ b/test/transforms/fixtures/split-block/block-start/output.yaml @@ -4,17 +4,14 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: "" + text: "" - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/split-block/depth/input.yaml b/test/transforms/fixtures/split-block/depth/input.yaml index d1f658170..577eb8b0b 100644 --- a/test/transforms/fixtures/split-block/depth/input.yaml +++ b/test/transforms/fixtures/split-block/depth/input.yaml @@ -10,5 +10,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-block/depth/output.yaml b/test/transforms/fixtures/split-block/depth/output.yaml index 951fe547b..145f63ff8 100644 --- a/test/transforms/fixtures/split-block/depth/output.yaml +++ b/test/transforms/fixtures/split-block/depth/output.yaml @@ -10,8 +10,7 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wo + text: wo - kind: block type: paragraph nodes: @@ -22,5 +21,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/split-block/with-delete-across-blocks-and-inlines/input.yaml b/test/transforms/fixtures/split-block/with-delete-across-blocks-and-inlines/input.yaml index f302fa89a..9d4daa75a 100644 --- a/test/transforms/fixtures/split-block/with-delete-across-blocks-and-inlines/input.yaml +++ b/test/transforms/fixtures/split-block/with-delete-across-blocks-and-inlines/input.yaml @@ -7,8 +7,7 @@ nodes: type: one nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: two nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/split-block/with-delete-across-blocks-and-inlines/output.yaml b/test/transforms/fixtures/split-block/with-delete-across-blocks-and-inlines/output.yaml index 68e8a525b..ee19749e5 100644 --- a/test/transforms/fixtures/split-block/with-delete-across-blocks-and-inlines/output.yaml +++ b/test/transforms/fixtures/split-block/with-delete-across-blocks-and-inlines/output.yaml @@ -7,8 +7,7 @@ nodes: type: one nodes: - kind: text - ranges: - - text: wo + text: wo - kind: block type: paragraph nodes: @@ -16,11 +15,9 @@ nodes: type: one nodes: - kind: text - ranges: - - text: "" + text: "" - kind: inline type: two nodes: - kind: text - ranges: - - text: other + text: other diff --git a/test/transforms/fixtures/split-block/with-delete-across-blocks/input.yaml b/test/transforms/fixtures/split-block/with-delete-across-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/split-block/with-delete-across-blocks/input.yaml +++ b/test/transforms/fixtures/split-block/with-delete-across-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/split-block/with-delete-across-blocks/output.yaml b/test/transforms/fixtures/split-block/with-delete-across-blocks/output.yaml index 69c1496d9..3f71c0a8d 100644 --- a/test/transforms/fixtures/split-block/with-delete-across-blocks/output.yaml +++ b/test/transforms/fixtures/split-block/with-delete-across-blocks/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wo + text: wo - kind: block type: paragraph nodes: - kind: text - ranges: - - text: other + text: other diff --git a/test/transforms/fixtures/split-block/with-delete/input.yaml b/test/transforms/fixtures/split-block/with-delete/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/split-block/with-delete/input.yaml +++ b/test/transforms/fixtures/split-block/with-delete/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-block/with-delete/output.yaml b/test/transforms/fixtures/split-block/with-delete/output.yaml index 58febc8d5..fc03093ab 100644 --- a/test/transforms/fixtures/split-block/with-delete/output.yaml +++ b/test/transforms/fixtures/split-block/with-delete/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: block type: paragraph nodes: - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/split-block/with-inline/input.yaml b/test/transforms/fixtures/split-block/with-inline/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/split-block/with-inline/input.yaml +++ b/test/transforms/fixtures/split-block/with-inline/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-block/with-inline/output.yaml b/test/transforms/fixtures/split-block/with-inline/output.yaml index e48953921..f87391c2b 100644 --- a/test/transforms/fixtures/split-block/with-inline/output.yaml +++ b/test/transforms/fixtures/split-block/with-inline/output.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/split-inline-at-range/block-end/input.yaml b/test/transforms/fixtures/split-inline-at-range/block-end/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/split-inline-at-range/block-end/input.yaml +++ b/test/transforms/fixtures/split-inline-at-range/block-end/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-inline-at-range/block-end/output.yaml b/test/transforms/fixtures/split-inline-at-range/block-end/output.yaml index 434d9939a..a236cf96f 100644 --- a/test/transforms/fixtures/split-inline-at-range/block-end/output.yaml +++ b/test/transforms/fixtures/split-inline-at-range/block-end/output.yaml @@ -7,11 +7,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: inline type: link nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/split-inline-at-range/block-middle/input.yaml b/test/transforms/fixtures/split-inline-at-range/block-middle/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/split-inline-at-range/block-middle/input.yaml +++ b/test/transforms/fixtures/split-inline-at-range/block-middle/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-inline-at-range/block-middle/output.yaml b/test/transforms/fixtures/split-inline-at-range/block-middle/output.yaml index 6bdc40da8..fe8c003f6 100644 --- a/test/transforms/fixtures/split-inline-at-range/block-middle/output.yaml +++ b/test/transforms/fixtures/split-inline-at-range/block-middle/output.yaml @@ -7,11 +7,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: link nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/split-inline-at-range/block-start/input.yaml b/test/transforms/fixtures/split-inline-at-range/block-start/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/split-inline-at-range/block-start/input.yaml +++ b/test/transforms/fixtures/split-inline-at-range/block-start/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-inline-at-range/block-start/output.yaml b/test/transforms/fixtures/split-inline-at-range/block-start/output.yaml index d3fe20ace..e67e780fb 100644 --- a/test/transforms/fixtures/split-inline-at-range/block-start/output.yaml +++ b/test/transforms/fixtures/split-inline-at-range/block-start/output.yaml @@ -7,11 +7,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: "" + text: "" - kind: inline type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-inline-at-range/depth/input.yaml b/test/transforms/fixtures/split-inline-at-range/depth/input.yaml index f2e6a77cf..7cf6ea506 100644 --- a/test/transforms/fixtures/split-inline-at-range/depth/input.yaml +++ b/test/transforms/fixtures/split-inline-at-range/depth/input.yaml @@ -10,5 +10,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-inline-at-range/depth/output.yaml b/test/transforms/fixtures/split-inline-at-range/depth/output.yaml index 478a597f4..419b1bf8d 100644 --- a/test/transforms/fixtures/split-inline-at-range/depth/output.yaml +++ b/test/transforms/fixtures/split-inline-at-range/depth/output.yaml @@ -10,11 +10,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: link nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/split-inline-at-range/with-delete/input.yaml b/test/transforms/fixtures/split-inline-at-range/with-delete/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/split-inline-at-range/with-delete/input.yaml +++ b/test/transforms/fixtures/split-inline-at-range/with-delete/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-inline-at-range/with-delete/output.yaml b/test/transforms/fixtures/split-inline-at-range/with-delete/output.yaml index ccfc404a5..771de7f9b 100644 --- a/test/transforms/fixtures/split-inline-at-range/with-delete/output.yaml +++ b/test/transforms/fixtures/split-inline-at-range/with-delete/output.yaml @@ -7,11 +7,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: link nodes: - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/split-inline/block-end/input.yaml b/test/transforms/fixtures/split-inline/block-end/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/split-inline/block-end/input.yaml +++ b/test/transforms/fixtures/split-inline/block-end/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-inline/block-end/output.yaml b/test/transforms/fixtures/split-inline/block-end/output.yaml index 434d9939a..a236cf96f 100644 --- a/test/transforms/fixtures/split-inline/block-end/output.yaml +++ b/test/transforms/fixtures/split-inline/block-end/output.yaml @@ -7,11 +7,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: inline type: link nodes: - kind: text - ranges: - - text: "" + text: "" diff --git a/test/transforms/fixtures/split-inline/block-middle/input.yaml b/test/transforms/fixtures/split-inline/block-middle/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/split-inline/block-middle/input.yaml +++ b/test/transforms/fixtures/split-inline/block-middle/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-inline/block-middle/output.yaml b/test/transforms/fixtures/split-inline/block-middle/output.yaml index 6bdc40da8..fe8c003f6 100644 --- a/test/transforms/fixtures/split-inline/block-middle/output.yaml +++ b/test/transforms/fixtures/split-inline/block-middle/output.yaml @@ -7,11 +7,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: link nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/split-inline/block-start/input.yaml b/test/transforms/fixtures/split-inline/block-start/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/split-inline/block-start/input.yaml +++ b/test/transforms/fixtures/split-inline/block-start/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-inline/block-start/output.yaml b/test/transforms/fixtures/split-inline/block-start/output.yaml index d3fe20ace..e67e780fb 100644 --- a/test/transforms/fixtures/split-inline/block-start/output.yaml +++ b/test/transforms/fixtures/split-inline/block-start/output.yaml @@ -7,11 +7,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: "" + text: "" - kind: inline type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-inline/depth/input.yaml b/test/transforms/fixtures/split-inline/depth/input.yaml index f2e6a77cf..7cf6ea506 100644 --- a/test/transforms/fixtures/split-inline/depth/input.yaml +++ b/test/transforms/fixtures/split-inline/depth/input.yaml @@ -10,5 +10,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-inline/depth/output.yaml b/test/transforms/fixtures/split-inline/depth/output.yaml index 478a597f4..419b1bf8d 100644 --- a/test/transforms/fixtures/split-inline/depth/output.yaml +++ b/test/transforms/fixtures/split-inline/depth/output.yaml @@ -10,11 +10,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: link nodes: - kind: text - ranges: - - text: rd + text: rd diff --git a/test/transforms/fixtures/split-inline/with-delete/input.yaml b/test/transforms/fixtures/split-inline/with-delete/input.yaml index 395351b4f..f752cee89 100644 --- a/test/transforms/fixtures/split-inline/with-delete/input.yaml +++ b/test/transforms/fixtures/split-inline/with-delete/input.yaml @@ -7,5 +7,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/split-inline/with-delete/output.yaml b/test/transforms/fixtures/split-inline/with-delete/output.yaml index ccfc404a5..771de7f9b 100644 --- a/test/transforms/fixtures/split-inline/with-delete/output.yaml +++ b/test/transforms/fixtures/split-inline/with-delete/output.yaml @@ -7,11 +7,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: link nodes: - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/toggle-mark-at-range/add-across-blocks/input.yaml b/test/transforms/fixtures/toggle-mark-at-range/add-across-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/toggle-mark-at-range/add-across-blocks/input.yaml +++ b/test/transforms/fixtures/toggle-mark-at-range/add-across-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/toggle-mark-at-range/add-across-inlines/input.yaml b/test/transforms/fixtures/toggle-mark-at-range/add-across-inlines/input.yaml index c31f583e3..2568c6b66 100644 --- a/test/transforms/fixtures/toggle-mark-at-range/add-across-inlines/input.yaml +++ b/test/transforms/fixtures/toggle-mark-at-range/add-across-inlines/input.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/toggle-mark-at-range/add-first-character/input.yaml b/test/transforms/fixtures/toggle-mark-at-range/add-first-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark-at-range/add-first-character/input.yaml +++ b/test/transforms/fixtures/toggle-mark-at-range/add-first-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark-at-range/add-last-character/input.yaml b/test/transforms/fixtures/toggle-mark-at-range/add-last-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark-at-range/add-last-character/input.yaml +++ b/test/transforms/fixtures/toggle-mark-at-range/add-last-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark-at-range/add-middle-character/input.yaml b/test/transforms/fixtures/toggle-mark-at-range/add-middle-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark-at-range/add-middle-character/input.yaml +++ b/test/transforms/fixtures/toggle-mark-at-range/add-middle-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark-at-range/add-whole-word/input.yaml b/test/transforms/fixtures/toggle-mark-at-range/add-whole-word/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark-at-range/add-whole-word/input.yaml +++ b/test/transforms/fixtures/toggle-mark-at-range/add-whole-word/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark-at-range/add-with-mark-object/input.yaml b/test/transforms/fixtures/toggle-mark-at-range/add-with-mark-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark-at-range/add-with-mark-object/input.yaml +++ b/test/transforms/fixtures/toggle-mark-at-range/add-with-mark-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark-at-range/add-with-plain-object/input.yaml b/test/transforms/fixtures/toggle-mark-at-range/add-with-plain-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark-at-range/add-with-plain-object/input.yaml +++ b/test/transforms/fixtures/toggle-mark-at-range/add-with-plain-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark-at-range/remove-whole-word/output.yaml b/test/transforms/fixtures/toggle-mark-at-range/remove-whole-word/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark-at-range/remove-whole-word/output.yaml +++ b/test/transforms/fixtures/toggle-mark-at-range/remove-whole-word/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark-at-range/remove-with-mark-object/output.yaml b/test/transforms/fixtures/toggle-mark-at-range/remove-with-mark-object/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark-at-range/remove-with-mark-object/output.yaml +++ b/test/transforms/fixtures/toggle-mark-at-range/remove-with-mark-object/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark-at-range/remove-with-plain-object/output.yaml b/test/transforms/fixtures/toggle-mark-at-range/remove-with-plain-object/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark-at-range/remove-with-plain-object/output.yaml +++ b/test/transforms/fixtures/toggle-mark-at-range/remove-with-plain-object/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark/add-across-blocks/input.yaml b/test/transforms/fixtures/toggle-mark/add-across-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/toggle-mark/add-across-blocks/input.yaml +++ b/test/transforms/fixtures/toggle-mark/add-across-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/toggle-mark/add-across-inlines/input.yaml b/test/transforms/fixtures/toggle-mark/add-across-inlines/input.yaml index c31f583e3..2568c6b66 100644 --- a/test/transforms/fixtures/toggle-mark/add-across-inlines/input.yaml +++ b/test/transforms/fixtures/toggle-mark/add-across-inlines/input.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/toggle-mark/add-collapsed-selection/input.yaml b/test/transforms/fixtures/toggle-mark/add-collapsed-selection/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark/add-collapsed-selection/input.yaml +++ b/test/transforms/fixtures/toggle-mark/add-collapsed-selection/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark/add-first-character/input.yaml b/test/transforms/fixtures/toggle-mark/add-first-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark/add-first-character/input.yaml +++ b/test/transforms/fixtures/toggle-mark/add-first-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark/add-last-character/input.yaml b/test/transforms/fixtures/toggle-mark/add-last-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark/add-last-character/input.yaml +++ b/test/transforms/fixtures/toggle-mark/add-last-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark/add-middle-character/input.yaml b/test/transforms/fixtures/toggle-mark/add-middle-character/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark/add-middle-character/input.yaml +++ b/test/transforms/fixtures/toggle-mark/add-middle-character/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark/add-whole-word/input.yaml b/test/transforms/fixtures/toggle-mark/add-whole-word/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark/add-whole-word/input.yaml +++ b/test/transforms/fixtures/toggle-mark/add-whole-word/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark/add-with-mark-object/input.yaml b/test/transforms/fixtures/toggle-mark/add-with-mark-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark/add-with-mark-object/input.yaml +++ b/test/transforms/fixtures/toggle-mark/add-with-mark-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark/add-with-plain-object/input.yaml b/test/transforms/fixtures/toggle-mark/add-with-plain-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark/add-with-plain-object/input.yaml +++ b/test/transforms/fixtures/toggle-mark/add-with-plain-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark/remove-across-blocks/output.yaml b/test/transforms/fixtures/toggle-mark/remove-across-blocks/output.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/toggle-mark/remove-across-blocks/output.yaml +++ b/test/transforms/fixtures/toggle-mark/remove-across-blocks/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/toggle-mark/remove-across-inlines/output.yaml b/test/transforms/fixtures/toggle-mark/remove-across-inlines/output.yaml index c31f583e3..2568c6b66 100644 --- a/test/transforms/fixtures/toggle-mark/remove-across-inlines/output.yaml +++ b/test/transforms/fixtures/toggle-mark/remove-across-inlines/output.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/toggle-mark/remove-collapsed-selection/input.yaml b/test/transforms/fixtures/toggle-mark/remove-collapsed-selection/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark/remove-collapsed-selection/input.yaml +++ b/test/transforms/fixtures/toggle-mark/remove-collapsed-selection/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark/remove-collapsed-selection/output.yaml b/test/transforms/fixtures/toggle-mark/remove-collapsed-selection/output.yaml index a373de628..2318b4163 100644 --- a/test/transforms/fixtures/toggle-mark/remove-collapsed-selection/output.yaml +++ b/test/transforms/fixtures/toggle-mark/remove-collapsed-selection/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: aword + text: aword diff --git a/test/transforms/fixtures/toggle-mark/remove-first-character/output.yaml b/test/transforms/fixtures/toggle-mark/remove-first-character/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark/remove-first-character/output.yaml +++ b/test/transforms/fixtures/toggle-mark/remove-first-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark/remove-last-character/output.yaml b/test/transforms/fixtures/toggle-mark/remove-last-character/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark/remove-last-character/output.yaml +++ b/test/transforms/fixtures/toggle-mark/remove-last-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark/remove-middle-character/output.yaml b/test/transforms/fixtures/toggle-mark/remove-middle-character/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark/remove-middle-character/output.yaml +++ b/test/transforms/fixtures/toggle-mark/remove-middle-character/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark/remove-whole-word/output.yaml b/test/transforms/fixtures/toggle-mark/remove-whole-word/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark/remove-whole-word/output.yaml +++ b/test/transforms/fixtures/toggle-mark/remove-whole-word/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark/remove-with-mark-object/output.yaml b/test/transforms/fixtures/toggle-mark/remove-with-mark-object/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark/remove-with-mark-object/output.yaml +++ b/test/transforms/fixtures/toggle-mark/remove-with-mark-object/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/toggle-mark/remove-with-plain-object/output.yaml b/test/transforms/fixtures/toggle-mark/remove-with-plain-object/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/toggle-mark/remove-with-plain-object/output.yaml +++ b/test/transforms/fixtures/toggle-mark/remove-with-plain-object/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-block-at-range/across-blocks/input.yaml b/test/transforms/fixtures/unwrap-block-at-range/across-blocks/input.yaml index 87b381f13..639ef09f0 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/across-blocks/input.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/across-blocks/input.yaml @@ -7,11 +7,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/unwrap-block-at-range/across-blocks/output.yaml b/test/transforms/fixtures/unwrap-block-at-range/across-blocks/output.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/across-blocks/output.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/across-blocks/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/unwrap-block-at-range/across-inlines/input.yaml b/test/transforms/fixtures/unwrap-block-at-range/across-inlines/input.yaml index f4bfc7303..8a2784628 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/across-inlines/input.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/across-inlines/input.yaml @@ -10,8 +10,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -19,5 +18,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/unwrap-block-at-range/across-inlines/output.yaml b/test/transforms/fixtures/unwrap-block-at-range/across-inlines/output.yaml index c31f583e3..2568c6b66 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/across-inlines/output.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/across-inlines/output.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/unwrap-block-at-range/ending-child-blocks/input.yaml b/test/transforms/fixtures/unwrap-block-at-range/ending-child-blocks/input.yaml index 1279141e4..1d67a2e1d 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/ending-child-blocks/input.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/ending-child-blocks/input.yaml @@ -7,35 +7,29 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: one + text: one - kind: block type: paragraph nodes: - kind: text - ranges: - - text: two + text: two - kind: block type: paragraph nodes: - kind: text - ranges: - - text: three + text: three - kind: block type: paragraph nodes: - kind: text - ranges: - - text: four + text: four - kind: block type: paragraph nodes: - kind: text - ranges: - - text: five + text: five - kind: block type: paragraph nodes: - kind: text - ranges: - - text: six + text: six diff --git a/test/transforms/fixtures/unwrap-block-at-range/ending-child-blocks/output.yaml b/test/transforms/fixtures/unwrap-block-at-range/ending-child-blocks/output.yaml index 395624841..560d07087 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/ending-child-blocks/output.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/ending-child-blocks/output.yaml @@ -7,35 +7,29 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: one + text: one - kind: block type: paragraph nodes: - kind: text - ranges: - - text: two + text: two - kind: block type: paragraph nodes: - kind: text - ranges: - - text: three + text: three - kind: block type: paragraph nodes: - kind: text - ranges: - - text: four + text: four - kind: block type: paragraph nodes: - kind: text - ranges: - - text: five + text: five - kind: block type: paragraph nodes: - kind: text - ranges: - - text: six + text: six diff --git a/test/transforms/fixtures/unwrap-block-at-range/middle-child-blocks/input.yaml b/test/transforms/fixtures/unwrap-block-at-range/middle-child-blocks/input.yaml index 1279141e4..1d67a2e1d 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/middle-child-blocks/input.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/middle-child-blocks/input.yaml @@ -7,35 +7,29 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: one + text: one - kind: block type: paragraph nodes: - kind: text - ranges: - - text: two + text: two - kind: block type: paragraph nodes: - kind: text - ranges: - - text: three + text: three - kind: block type: paragraph nodes: - kind: text - ranges: - - text: four + text: four - kind: block type: paragraph nodes: - kind: text - ranges: - - text: five + text: five - kind: block type: paragraph nodes: - kind: text - ranges: - - text: six + text: six diff --git a/test/transforms/fixtures/unwrap-block-at-range/middle-child-blocks/output.yaml b/test/transforms/fixtures/unwrap-block-at-range/middle-child-blocks/output.yaml index edf758d4a..5d6e55cc2 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/middle-child-blocks/output.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/middle-child-blocks/output.yaml @@ -7,26 +7,22 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: one + text: one - kind: block type: paragraph nodes: - kind: text - ranges: - - text: two + text: two - kind: block type: paragraph nodes: - kind: text - ranges: - - text: three + text: three - kind: block type: paragraph nodes: - kind: text - ranges: - - text: four + text: four - kind: block type: quote nodes: @@ -34,11 +30,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: five + text: five - kind: block type: paragraph nodes: - kind: text - ranges: - - text: six + text: six diff --git a/test/transforms/fixtures/unwrap-block-at-range/nested-block/input.yaml b/test/transforms/fixtures/unwrap-block-at-range/nested-block/input.yaml index 5dd1c2b59..6c493d9f7 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/nested-block/input.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/nested-block/input.yaml @@ -10,5 +10,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-block-at-range/nested-block/output.yaml b/test/transforms/fixtures/unwrap-block-at-range/nested-block/output.yaml index c4ac2e6c5..5c54eec1d 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/nested-block/output.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/nested-block/output.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-block-at-range/single-block/input.yaml b/test/transforms/fixtures/unwrap-block-at-range/single-block/input.yaml index c4ac2e6c5..5c54eec1d 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/single-block/input.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/single-block/input.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-block-at-range/single-block/output.yaml b/test/transforms/fixtures/unwrap-block-at-range/single-block/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/single-block/output.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/single-block/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-block-at-range/starting-child-blocks/input.yaml b/test/transforms/fixtures/unwrap-block-at-range/starting-child-blocks/input.yaml index 1279141e4..1d67a2e1d 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/starting-child-blocks/input.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/starting-child-blocks/input.yaml @@ -7,35 +7,29 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: one + text: one - kind: block type: paragraph nodes: - kind: text - ranges: - - text: two + text: two - kind: block type: paragraph nodes: - kind: text - ranges: - - text: three + text: three - kind: block type: paragraph nodes: - kind: text - ranges: - - text: four + text: four - kind: block type: paragraph nodes: - kind: text - ranges: - - text: five + text: five - kind: block type: paragraph nodes: - kind: text - ranges: - - text: six + text: six diff --git a/test/transforms/fixtures/unwrap-block-at-range/starting-child-blocks/output.yaml b/test/transforms/fixtures/unwrap-block-at-range/starting-child-blocks/output.yaml index 580c42ce3..e1c696a3d 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/starting-child-blocks/output.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/starting-child-blocks/output.yaml @@ -4,14 +4,12 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: one + text: one - kind: block type: paragraph nodes: - kind: text - ranges: - - text: two + text: two - kind: block type: quote nodes: @@ -19,23 +17,19 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: three + text: three - kind: block type: paragraph nodes: - kind: text - ranges: - - text: four + text: four - kind: block type: paragraph nodes: - kind: text - ranges: - - text: five + text: five - kind: block type: paragraph nodes: - kind: text - ranges: - - text: six + text: six diff --git a/test/transforms/fixtures/unwrap-block-at-range/with-data-object/input.yaml b/test/transforms/fixtures/unwrap-block-at-range/with-data-object/input.yaml index ad222fcde..9f139e014 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/with-data-object/input.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/with-data-object/input.yaml @@ -9,5 +9,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-block-at-range/with-data-object/output.yaml b/test/transforms/fixtures/unwrap-block-at-range/with-data-object/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/with-data-object/output.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/with-data-object/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-block-at-range/with-data/input.yaml b/test/transforms/fixtures/unwrap-block-at-range/with-data/input.yaml index ad222fcde..9f139e014 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/with-data/input.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/with-data/input.yaml @@ -9,5 +9,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-block-at-range/with-data/output.yaml b/test/transforms/fixtures/unwrap-block-at-range/with-data/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/unwrap-block-at-range/with-data/output.yaml +++ b/test/transforms/fixtures/unwrap-block-at-range/with-data/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-block/across-blocks/input.yaml b/test/transforms/fixtures/unwrap-block/across-blocks/input.yaml index 87b381f13..639ef09f0 100644 --- a/test/transforms/fixtures/unwrap-block/across-blocks/input.yaml +++ b/test/transforms/fixtures/unwrap-block/across-blocks/input.yaml @@ -7,11 +7,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/unwrap-block/across-blocks/output.yaml b/test/transforms/fixtures/unwrap-block/across-blocks/output.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/unwrap-block/across-blocks/output.yaml +++ b/test/transforms/fixtures/unwrap-block/across-blocks/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/unwrap-block/across-inlines/input.yaml b/test/transforms/fixtures/unwrap-block/across-inlines/input.yaml index f4bfc7303..8a2784628 100644 --- a/test/transforms/fixtures/unwrap-block/across-inlines/input.yaml +++ b/test/transforms/fixtures/unwrap-block/across-inlines/input.yaml @@ -10,8 +10,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -19,5 +18,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/unwrap-block/across-inlines/output.yaml b/test/transforms/fixtures/unwrap-block/across-inlines/output.yaml index c31f583e3..2568c6b66 100644 --- a/test/transforms/fixtures/unwrap-block/across-inlines/output.yaml +++ b/test/transforms/fixtures/unwrap-block/across-inlines/output.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/unwrap-block/ending-child-blocks/input.yaml b/test/transforms/fixtures/unwrap-block/ending-child-blocks/input.yaml index 1279141e4..1d67a2e1d 100644 --- a/test/transforms/fixtures/unwrap-block/ending-child-blocks/input.yaml +++ b/test/transforms/fixtures/unwrap-block/ending-child-blocks/input.yaml @@ -7,35 +7,29 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: one + text: one - kind: block type: paragraph nodes: - kind: text - ranges: - - text: two + text: two - kind: block type: paragraph nodes: - kind: text - ranges: - - text: three + text: three - kind: block type: paragraph nodes: - kind: text - ranges: - - text: four + text: four - kind: block type: paragraph nodes: - kind: text - ranges: - - text: five + text: five - kind: block type: paragraph nodes: - kind: text - ranges: - - text: six + text: six diff --git a/test/transforms/fixtures/unwrap-block/ending-child-blocks/output.yaml b/test/transforms/fixtures/unwrap-block/ending-child-blocks/output.yaml index 395624841..560d07087 100644 --- a/test/transforms/fixtures/unwrap-block/ending-child-blocks/output.yaml +++ b/test/transforms/fixtures/unwrap-block/ending-child-blocks/output.yaml @@ -7,35 +7,29 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: one + text: one - kind: block type: paragraph nodes: - kind: text - ranges: - - text: two + text: two - kind: block type: paragraph nodes: - kind: text - ranges: - - text: three + text: three - kind: block type: paragraph nodes: - kind: text - ranges: - - text: four + text: four - kind: block type: paragraph nodes: - kind: text - ranges: - - text: five + text: five - kind: block type: paragraph nodes: - kind: text - ranges: - - text: six + text: six diff --git a/test/transforms/fixtures/unwrap-block/middle-child-blocks/input.yaml b/test/transforms/fixtures/unwrap-block/middle-child-blocks/input.yaml index 1279141e4..1d67a2e1d 100644 --- a/test/transforms/fixtures/unwrap-block/middle-child-blocks/input.yaml +++ b/test/transforms/fixtures/unwrap-block/middle-child-blocks/input.yaml @@ -7,35 +7,29 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: one + text: one - kind: block type: paragraph nodes: - kind: text - ranges: - - text: two + text: two - kind: block type: paragraph nodes: - kind: text - ranges: - - text: three + text: three - kind: block type: paragraph nodes: - kind: text - ranges: - - text: four + text: four - kind: block type: paragraph nodes: - kind: text - ranges: - - text: five + text: five - kind: block type: paragraph nodes: - kind: text - ranges: - - text: six + text: six diff --git a/test/transforms/fixtures/unwrap-block/middle-child-blocks/output.yaml b/test/transforms/fixtures/unwrap-block/middle-child-blocks/output.yaml index edf758d4a..5d6e55cc2 100644 --- a/test/transforms/fixtures/unwrap-block/middle-child-blocks/output.yaml +++ b/test/transforms/fixtures/unwrap-block/middle-child-blocks/output.yaml @@ -7,26 +7,22 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: one + text: one - kind: block type: paragraph nodes: - kind: text - ranges: - - text: two + text: two - kind: block type: paragraph nodes: - kind: text - ranges: - - text: three + text: three - kind: block type: paragraph nodes: - kind: text - ranges: - - text: four + text: four - kind: block type: quote nodes: @@ -34,11 +30,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: five + text: five - kind: block type: paragraph nodes: - kind: text - ranges: - - text: six + text: six diff --git a/test/transforms/fixtures/unwrap-block/nested-block/input.yaml b/test/transforms/fixtures/unwrap-block/nested-block/input.yaml index 5dd1c2b59..6c493d9f7 100644 --- a/test/transforms/fixtures/unwrap-block/nested-block/input.yaml +++ b/test/transforms/fixtures/unwrap-block/nested-block/input.yaml @@ -10,5 +10,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-block/nested-block/output.yaml b/test/transforms/fixtures/unwrap-block/nested-block/output.yaml index c4ac2e6c5..5c54eec1d 100644 --- a/test/transforms/fixtures/unwrap-block/nested-block/output.yaml +++ b/test/transforms/fixtures/unwrap-block/nested-block/output.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-block/single-block/input.yaml b/test/transforms/fixtures/unwrap-block/single-block/input.yaml index c4ac2e6c5..5c54eec1d 100644 --- a/test/transforms/fixtures/unwrap-block/single-block/input.yaml +++ b/test/transforms/fixtures/unwrap-block/single-block/input.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-block/single-block/output.yaml b/test/transforms/fixtures/unwrap-block/single-block/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/unwrap-block/single-block/output.yaml +++ b/test/transforms/fixtures/unwrap-block/single-block/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-block/starting-child-blocks/input.yaml b/test/transforms/fixtures/unwrap-block/starting-child-blocks/input.yaml index 1279141e4..1d67a2e1d 100644 --- a/test/transforms/fixtures/unwrap-block/starting-child-blocks/input.yaml +++ b/test/transforms/fixtures/unwrap-block/starting-child-blocks/input.yaml @@ -7,35 +7,29 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: one + text: one - kind: block type: paragraph nodes: - kind: text - ranges: - - text: two + text: two - kind: block type: paragraph nodes: - kind: text - ranges: - - text: three + text: three - kind: block type: paragraph nodes: - kind: text - ranges: - - text: four + text: four - kind: block type: paragraph nodes: - kind: text - ranges: - - text: five + text: five - kind: block type: paragraph nodes: - kind: text - ranges: - - text: six + text: six diff --git a/test/transforms/fixtures/unwrap-block/starting-child-blocks/output.yaml b/test/transforms/fixtures/unwrap-block/starting-child-blocks/output.yaml index 580c42ce3..e1c696a3d 100644 --- a/test/transforms/fixtures/unwrap-block/starting-child-blocks/output.yaml +++ b/test/transforms/fixtures/unwrap-block/starting-child-blocks/output.yaml @@ -4,14 +4,12 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: one + text: one - kind: block type: paragraph nodes: - kind: text - ranges: - - text: two + text: two - kind: block type: quote nodes: @@ -19,23 +17,19 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: three + text: three - kind: block type: paragraph nodes: - kind: text - ranges: - - text: four + text: four - kind: block type: paragraph nodes: - kind: text - ranges: - - text: five + text: five - kind: block type: paragraph nodes: - kind: text - ranges: - - text: six + text: six diff --git a/test/transforms/fixtures/unwrap-block/with-data-object/input.yaml b/test/transforms/fixtures/unwrap-block/with-data-object/input.yaml index ad222fcde..9f139e014 100644 --- a/test/transforms/fixtures/unwrap-block/with-data-object/input.yaml +++ b/test/transforms/fixtures/unwrap-block/with-data-object/input.yaml @@ -9,5 +9,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-block/with-data-object/output.yaml b/test/transforms/fixtures/unwrap-block/with-data-object/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/unwrap-block/with-data-object/output.yaml +++ b/test/transforms/fixtures/unwrap-block/with-data-object/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-block/with-data/input.yaml b/test/transforms/fixtures/unwrap-block/with-data/input.yaml index ad222fcde..9f139e014 100644 --- a/test/transforms/fixtures/unwrap-block/with-data/input.yaml +++ b/test/transforms/fixtures/unwrap-block/with-data/input.yaml @@ -9,5 +9,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-block/with-data/output.yaml b/test/transforms/fixtures/unwrap-block/with-data/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/unwrap-block/with-data/output.yaml +++ b/test/transforms/fixtures/unwrap-block/with-data/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-inline-at-range/across-blocks/input.yaml b/test/transforms/fixtures/unwrap-inline-at-range/across-blocks/input.yaml index 2fabb8799..57d48f74f 100644 --- a/test/transforms/fixtures/unwrap-inline-at-range/across-blocks/input.yaml +++ b/test/transforms/fixtures/unwrap-inline-at-range/across-blocks/input.yaml @@ -4,14 +4,12 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: hashtag nodes: - kind: text - ranges: - - text: rd + text: rd - kind: block type: paragraph nodes: @@ -19,8 +17,6 @@ nodes: type: hashtag nodes: - kind: text - ranges: - - text: an + text: an - kind: text - ranges: - - text: other + text: other diff --git a/test/transforms/fixtures/unwrap-inline-at-range/across-blocks/output.yaml b/test/transforms/fixtures/unwrap-inline-at-range/across-blocks/output.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/unwrap-inline-at-range/across-blocks/output.yaml +++ b/test/transforms/fixtures/unwrap-inline-at-range/across-blocks/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/unwrap-inline-at-range/across-inlines/input.yaml b/test/transforms/fixtures/unwrap-inline-at-range/across-inlines/input.yaml index 21f86cab1..ac1ce70ca 100644 --- a/test/transforms/fixtures/unwrap-inline-at-range/across-inlines/input.yaml +++ b/test/transforms/fixtures/unwrap-inline-at-range/across-inlines/input.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: hashtag nodes: @@ -16,8 +15,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: rd + text: rd - kind: inline type: hashtag nodes: @@ -25,11 +23,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: an + text: an - kind: inline type: link nodes: - kind: text - ranges: - - text: other + text: other diff --git a/test/transforms/fixtures/unwrap-inline-at-range/across-inlines/output.yaml b/test/transforms/fixtures/unwrap-inline-at-range/across-inlines/output.yaml index 981b6c6f3..578e6416e 100644 --- a/test/transforms/fixtures/unwrap-inline-at-range/across-inlines/output.yaml +++ b/test/transforms/fixtures/unwrap-inline-at-range/across-inlines/output.yaml @@ -7,23 +7,19 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: link nodes: - kind: text - ranges: - - text: rd + text: rd - kind: inline type: link nodes: - kind: text - ranges: - - text: an + text: an - kind: inline type: link nodes: - kind: text - ranges: - - text: other + text: other diff --git a/test/transforms/fixtures/unwrap-inline-at-range/nested-block/input.yaml b/test/transforms/fixtures/unwrap-inline-at-range/nested-block/input.yaml index 8847000bf..dda085eb1 100644 --- a/test/transforms/fixtures/unwrap-inline-at-range/nested-block/input.yaml +++ b/test/transforms/fixtures/unwrap-inline-at-range/nested-block/input.yaml @@ -7,14 +7,11 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/unwrap-inline-at-range/nested-block/output.yaml b/test/transforms/fixtures/unwrap-inline-at-range/nested-block/output.yaml index c4ac2e6c5..5c54eec1d 100644 --- a/test/transforms/fixtures/unwrap-inline-at-range/nested-block/output.yaml +++ b/test/transforms/fixtures/unwrap-inline-at-range/nested-block/output.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-inline-at-range/single-block/input.yaml b/test/transforms/fixtures/unwrap-inline-at-range/single-block/input.yaml index fc07c88f4..7bfbe8b4b 100644 --- a/test/transforms/fixtures/unwrap-inline-at-range/single-block/input.yaml +++ b/test/transforms/fixtures/unwrap-inline-at-range/single-block/input.yaml @@ -4,14 +4,11 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/unwrap-inline-at-range/single-block/output.yaml b/test/transforms/fixtures/unwrap-inline-at-range/single-block/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/unwrap-inline-at-range/single-block/output.yaml +++ b/test/transforms/fixtures/unwrap-inline-at-range/single-block/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-inline-at-range/with-data-object/input.yaml b/test/transforms/fixtures/unwrap-inline-at-range/with-data-object/input.yaml index a418fa379..bea41d2de 100644 --- a/test/transforms/fixtures/unwrap-inline-at-range/with-data-object/input.yaml +++ b/test/transforms/fixtures/unwrap-inline-at-range/with-data-object/input.yaml @@ -4,8 +4,7 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag data: @@ -17,8 +16,6 @@ nodes: key: two nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/unwrap-inline-at-range/with-data-object/output.yaml b/test/transforms/fixtures/unwrap-inline-at-range/with-data-object/output.yaml index e4836686f..466693bbb 100644 --- a/test/transforms/fixtures/unwrap-inline-at-range/with-data-object/output.yaml +++ b/test/transforms/fixtures/unwrap-inline-at-range/with-data-object/output.yaml @@ -4,16 +4,13 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag data: key: two nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/unwrap-inline-at-range/with-data/input.yaml b/test/transforms/fixtures/unwrap-inline-at-range/with-data/input.yaml index a418fa379..bea41d2de 100644 --- a/test/transforms/fixtures/unwrap-inline-at-range/with-data/input.yaml +++ b/test/transforms/fixtures/unwrap-inline-at-range/with-data/input.yaml @@ -4,8 +4,7 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag data: @@ -17,8 +16,6 @@ nodes: key: two nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/unwrap-inline-at-range/with-data/output.yaml b/test/transforms/fixtures/unwrap-inline-at-range/with-data/output.yaml index e4836686f..466693bbb 100644 --- a/test/transforms/fixtures/unwrap-inline-at-range/with-data/output.yaml +++ b/test/transforms/fixtures/unwrap-inline-at-range/with-data/output.yaml @@ -4,16 +4,13 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag data: key: two nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/unwrap-inline/across-blocks/input.yaml b/test/transforms/fixtures/unwrap-inline/across-blocks/input.yaml index 2fabb8799..57d48f74f 100644 --- a/test/transforms/fixtures/unwrap-inline/across-blocks/input.yaml +++ b/test/transforms/fixtures/unwrap-inline/across-blocks/input.yaml @@ -4,14 +4,12 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: hashtag nodes: - kind: text - ranges: - - text: rd + text: rd - kind: block type: paragraph nodes: @@ -19,8 +17,6 @@ nodes: type: hashtag nodes: - kind: text - ranges: - - text: an + text: an - kind: text - ranges: - - text: other + text: other diff --git a/test/transforms/fixtures/unwrap-inline/across-blocks/output.yaml b/test/transforms/fixtures/unwrap-inline/across-blocks/output.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/unwrap-inline/across-blocks/output.yaml +++ b/test/transforms/fixtures/unwrap-inline/across-blocks/output.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/unwrap-inline/across-inlines/input.yaml b/test/transforms/fixtures/unwrap-inline/across-inlines/input.yaml index 21f86cab1..ac1ce70ca 100644 --- a/test/transforms/fixtures/unwrap-inline/across-inlines/input.yaml +++ b/test/transforms/fixtures/unwrap-inline/across-inlines/input.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: hashtag nodes: @@ -16,8 +15,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: rd + text: rd - kind: inline type: hashtag nodes: @@ -25,11 +23,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: an + text: an - kind: inline type: link nodes: - kind: text - ranges: - - text: other + text: other diff --git a/test/transforms/fixtures/unwrap-inline/across-inlines/output.yaml b/test/transforms/fixtures/unwrap-inline/across-inlines/output.yaml index 981b6c6f3..578e6416e 100644 --- a/test/transforms/fixtures/unwrap-inline/across-inlines/output.yaml +++ b/test/transforms/fixtures/unwrap-inline/across-inlines/output.yaml @@ -7,23 +7,19 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: link nodes: - kind: text - ranges: - - text: rd + text: rd - kind: inline type: link nodes: - kind: text - ranges: - - text: an + text: an - kind: inline type: link nodes: - kind: text - ranges: - - text: other + text: other diff --git a/test/transforms/fixtures/unwrap-inline/nested-block/input.yaml b/test/transforms/fixtures/unwrap-inline/nested-block/input.yaml index 8847000bf..dda085eb1 100644 --- a/test/transforms/fixtures/unwrap-inline/nested-block/input.yaml +++ b/test/transforms/fixtures/unwrap-inline/nested-block/input.yaml @@ -7,14 +7,11 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/unwrap-inline/nested-block/output.yaml b/test/transforms/fixtures/unwrap-inline/nested-block/output.yaml index c4ac2e6c5..5c54eec1d 100644 --- a/test/transforms/fixtures/unwrap-inline/nested-block/output.yaml +++ b/test/transforms/fixtures/unwrap-inline/nested-block/output.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-inline/single-block/input.yaml b/test/transforms/fixtures/unwrap-inline/single-block/input.yaml index fc07c88f4..7bfbe8b4b 100644 --- a/test/transforms/fixtures/unwrap-inline/single-block/input.yaml +++ b/test/transforms/fixtures/unwrap-inline/single-block/input.yaml @@ -4,14 +4,11 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/unwrap-inline/single-block/output.yaml b/test/transforms/fixtures/unwrap-inline/single-block/output.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/unwrap-inline/single-block/output.yaml +++ b/test/transforms/fixtures/unwrap-inline/single-block/output.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/unwrap-inline/with-data-object/input.yaml b/test/transforms/fixtures/unwrap-inline/with-data-object/input.yaml index a418fa379..bea41d2de 100644 --- a/test/transforms/fixtures/unwrap-inline/with-data-object/input.yaml +++ b/test/transforms/fixtures/unwrap-inline/with-data-object/input.yaml @@ -4,8 +4,7 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag data: @@ -17,8 +16,6 @@ nodes: key: two nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/unwrap-inline/with-data-object/output.yaml b/test/transforms/fixtures/unwrap-inline/with-data-object/output.yaml index e4836686f..466693bbb 100644 --- a/test/transforms/fixtures/unwrap-inline/with-data-object/output.yaml +++ b/test/transforms/fixtures/unwrap-inline/with-data-object/output.yaml @@ -4,16 +4,13 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag data: key: two nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/unwrap-inline/with-data/input.yaml b/test/transforms/fixtures/unwrap-inline/with-data/input.yaml index a418fa379..bea41d2de 100644 --- a/test/transforms/fixtures/unwrap-inline/with-data/input.yaml +++ b/test/transforms/fixtures/unwrap-inline/with-data/input.yaml @@ -4,8 +4,7 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag data: @@ -17,8 +16,6 @@ nodes: key: two nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/unwrap-inline/with-data/output.yaml b/test/transforms/fixtures/unwrap-inline/with-data/output.yaml index e4836686f..466693bbb 100644 --- a/test/transforms/fixtures/unwrap-inline/with-data/output.yaml +++ b/test/transforms/fixtures/unwrap-inline/with-data/output.yaml @@ -4,16 +4,13 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag data: key: two nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/wrap-block-at-range/across-blocks/input.yaml b/test/transforms/fixtures/wrap-block-at-range/across-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/wrap-block-at-range/across-blocks/input.yaml +++ b/test/transforms/fixtures/wrap-block-at-range/across-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/wrap-block-at-range/across-blocks/output.yaml b/test/transforms/fixtures/wrap-block-at-range/across-blocks/output.yaml index 87b381f13..639ef09f0 100644 --- a/test/transforms/fixtures/wrap-block-at-range/across-blocks/output.yaml +++ b/test/transforms/fixtures/wrap-block-at-range/across-blocks/output.yaml @@ -7,11 +7,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/wrap-block-at-range/across-inlines/input.yaml b/test/transforms/fixtures/wrap-block-at-range/across-inlines/input.yaml index c31f583e3..2568c6b66 100644 --- a/test/transforms/fixtures/wrap-block-at-range/across-inlines/input.yaml +++ b/test/transforms/fixtures/wrap-block-at-range/across-inlines/input.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/wrap-block-at-range/across-inlines/output.yaml b/test/transforms/fixtures/wrap-block-at-range/across-inlines/output.yaml index f4bfc7303..8a2784628 100644 --- a/test/transforms/fixtures/wrap-block-at-range/across-inlines/output.yaml +++ b/test/transforms/fixtures/wrap-block-at-range/across-inlines/output.yaml @@ -10,8 +10,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -19,5 +18,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/wrap-block-at-range/nested-block/input.yaml b/test/transforms/fixtures/wrap-block-at-range/nested-block/input.yaml index c4ac2e6c5..5c54eec1d 100644 --- a/test/transforms/fixtures/wrap-block-at-range/nested-block/input.yaml +++ b/test/transforms/fixtures/wrap-block-at-range/nested-block/input.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-block-at-range/nested-block/output.yaml b/test/transforms/fixtures/wrap-block-at-range/nested-block/output.yaml index 5dd1c2b59..6c493d9f7 100644 --- a/test/transforms/fixtures/wrap-block-at-range/nested-block/output.yaml +++ b/test/transforms/fixtures/wrap-block-at-range/nested-block/output.yaml @@ -10,5 +10,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-block-at-range/single-block/input.yaml b/test/transforms/fixtures/wrap-block-at-range/single-block/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/wrap-block-at-range/single-block/input.yaml +++ b/test/transforms/fixtures/wrap-block-at-range/single-block/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-block-at-range/single-block/output.yaml b/test/transforms/fixtures/wrap-block-at-range/single-block/output.yaml index c4ac2e6c5..5c54eec1d 100644 --- a/test/transforms/fixtures/wrap-block-at-range/single-block/output.yaml +++ b/test/transforms/fixtures/wrap-block-at-range/single-block/output.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-block-at-range/with-data-object/input.yaml b/test/transforms/fixtures/wrap-block-at-range/with-data-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/wrap-block-at-range/with-data-object/input.yaml +++ b/test/transforms/fixtures/wrap-block-at-range/with-data-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-block-at-range/with-data-object/output.yaml b/test/transforms/fixtures/wrap-block-at-range/with-data-object/output.yaml index ad222fcde..9f139e014 100644 --- a/test/transforms/fixtures/wrap-block-at-range/with-data-object/output.yaml +++ b/test/transforms/fixtures/wrap-block-at-range/with-data-object/output.yaml @@ -9,5 +9,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-block-at-range/with-data/input.yaml b/test/transforms/fixtures/wrap-block-at-range/with-data/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/wrap-block-at-range/with-data/input.yaml +++ b/test/transforms/fixtures/wrap-block-at-range/with-data/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-block-at-range/with-data/output.yaml b/test/transforms/fixtures/wrap-block-at-range/with-data/output.yaml index ad222fcde..9f139e014 100644 --- a/test/transforms/fixtures/wrap-block-at-range/with-data/output.yaml +++ b/test/transforms/fixtures/wrap-block-at-range/with-data/output.yaml @@ -9,5 +9,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-block/across-blocks/input.yaml b/test/transforms/fixtures/wrap-block/across-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/wrap-block/across-blocks/input.yaml +++ b/test/transforms/fixtures/wrap-block/across-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/wrap-block/across-blocks/output.yaml b/test/transforms/fixtures/wrap-block/across-blocks/output.yaml index 87b381f13..639ef09f0 100644 --- a/test/transforms/fixtures/wrap-block/across-blocks/output.yaml +++ b/test/transforms/fixtures/wrap-block/across-blocks/output.yaml @@ -7,11 +7,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/wrap-block/across-inlines/input.yaml b/test/transforms/fixtures/wrap-block/across-inlines/input.yaml index c31f583e3..2568c6b66 100644 --- a/test/transforms/fixtures/wrap-block/across-inlines/input.yaml +++ b/test/transforms/fixtures/wrap-block/across-inlines/input.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -16,5 +15,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/wrap-block/across-inlines/output.yaml b/test/transforms/fixtures/wrap-block/across-inlines/output.yaml index f4bfc7303..8a2784628 100644 --- a/test/transforms/fixtures/wrap-block/across-inlines/output.yaml +++ b/test/transforms/fixtures/wrap-block/across-inlines/output.yaml @@ -10,8 +10,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: @@ -19,5 +18,4 @@ nodes: type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/wrap-block/nested-block/input.yaml b/test/transforms/fixtures/wrap-block/nested-block/input.yaml index c4ac2e6c5..5c54eec1d 100644 --- a/test/transforms/fixtures/wrap-block/nested-block/input.yaml +++ b/test/transforms/fixtures/wrap-block/nested-block/input.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-block/nested-block/output.yaml b/test/transforms/fixtures/wrap-block/nested-block/output.yaml index 5dd1c2b59..6c493d9f7 100644 --- a/test/transforms/fixtures/wrap-block/nested-block/output.yaml +++ b/test/transforms/fixtures/wrap-block/nested-block/output.yaml @@ -10,5 +10,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-block/single-block/input.yaml b/test/transforms/fixtures/wrap-block/single-block/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/wrap-block/single-block/input.yaml +++ b/test/transforms/fixtures/wrap-block/single-block/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-block/single-block/output.yaml b/test/transforms/fixtures/wrap-block/single-block/output.yaml index c4ac2e6c5..5c54eec1d 100644 --- a/test/transforms/fixtures/wrap-block/single-block/output.yaml +++ b/test/transforms/fixtures/wrap-block/single-block/output.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-block/with-data-object/input.yaml b/test/transforms/fixtures/wrap-block/with-data-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/wrap-block/with-data-object/input.yaml +++ b/test/transforms/fixtures/wrap-block/with-data-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-block/with-data-object/output.yaml b/test/transforms/fixtures/wrap-block/with-data-object/output.yaml index ad222fcde..9f139e014 100644 --- a/test/transforms/fixtures/wrap-block/with-data-object/output.yaml +++ b/test/transforms/fixtures/wrap-block/with-data-object/output.yaml @@ -9,5 +9,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-block/with-data/input.yaml b/test/transforms/fixtures/wrap-block/with-data/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/wrap-block/with-data/input.yaml +++ b/test/transforms/fixtures/wrap-block/with-data/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-block/with-data/output.yaml b/test/transforms/fixtures/wrap-block/with-data/output.yaml index ad222fcde..9f139e014 100644 --- a/test/transforms/fixtures/wrap-block/with-data/output.yaml +++ b/test/transforms/fixtures/wrap-block/with-data/output.yaml @@ -9,5 +9,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-inline-at-range/across-blocks/input.yaml b/test/transforms/fixtures/wrap-inline-at-range/across-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/wrap-inline-at-range/across-blocks/input.yaml +++ b/test/transforms/fixtures/wrap-inline-at-range/across-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/wrap-inline-at-range/across-blocks/output.yaml b/test/transforms/fixtures/wrap-inline-at-range/across-blocks/output.yaml index 2fabb8799..57d48f74f 100644 --- a/test/transforms/fixtures/wrap-inline-at-range/across-blocks/output.yaml +++ b/test/transforms/fixtures/wrap-inline-at-range/across-blocks/output.yaml @@ -4,14 +4,12 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: hashtag nodes: - kind: text - ranges: - - text: rd + text: rd - kind: block type: paragraph nodes: @@ -19,8 +17,6 @@ nodes: type: hashtag nodes: - kind: text - ranges: - - text: an + text: an - kind: text - ranges: - - text: other + text: other diff --git a/test/transforms/fixtures/wrap-inline-at-range/across-inlines/input.yaml b/test/transforms/fixtures/wrap-inline-at-range/across-inlines/input.yaml index 877fc950a..c17ccbcf2 100644 --- a/test/transforms/fixtures/wrap-inline-at-range/across-inlines/input.yaml +++ b/test/transforms/fixtures/wrap-inline-at-range/across-inlines/input.yaml @@ -7,11 +7,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: inline type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/wrap-inline-at-range/across-inlines/output.yaml b/test/transforms/fixtures/wrap-inline-at-range/across-inlines/output.yaml index 21f86cab1..ac1ce70ca 100644 --- a/test/transforms/fixtures/wrap-inline-at-range/across-inlines/output.yaml +++ b/test/transforms/fixtures/wrap-inline-at-range/across-inlines/output.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: hashtag nodes: @@ -16,8 +15,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: rd + text: rd - kind: inline type: hashtag nodes: @@ -25,11 +23,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: an + text: an - kind: inline type: link nodes: - kind: text - ranges: - - text: other + text: other diff --git a/test/transforms/fixtures/wrap-inline-at-range/nested-block/input.yaml b/test/transforms/fixtures/wrap-inline-at-range/nested-block/input.yaml index c4ac2e6c5..5c54eec1d 100644 --- a/test/transforms/fixtures/wrap-inline-at-range/nested-block/input.yaml +++ b/test/transforms/fixtures/wrap-inline-at-range/nested-block/input.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-inline-at-range/nested-block/output.yaml b/test/transforms/fixtures/wrap-inline-at-range/nested-block/output.yaml index 8847000bf..dda085eb1 100644 --- a/test/transforms/fixtures/wrap-inline-at-range/nested-block/output.yaml +++ b/test/transforms/fixtures/wrap-inline-at-range/nested-block/output.yaml @@ -7,14 +7,11 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/wrap-inline-at-range/single-block/input.yaml b/test/transforms/fixtures/wrap-inline-at-range/single-block/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/wrap-inline-at-range/single-block/input.yaml +++ b/test/transforms/fixtures/wrap-inline-at-range/single-block/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-inline-at-range/single-block/output.yaml b/test/transforms/fixtures/wrap-inline-at-range/single-block/output.yaml index fc07c88f4..7bfbe8b4b 100644 --- a/test/transforms/fixtures/wrap-inline-at-range/single-block/output.yaml +++ b/test/transforms/fixtures/wrap-inline-at-range/single-block/output.yaml @@ -4,14 +4,11 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/wrap-inline-at-range/with-data-object/input.yaml b/test/transforms/fixtures/wrap-inline-at-range/with-data-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/wrap-inline-at-range/with-data-object/input.yaml +++ b/test/transforms/fixtures/wrap-inline-at-range/with-data-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-inline-at-range/with-data-object/output.yaml b/test/transforms/fixtures/wrap-inline-at-range/with-data-object/output.yaml index 0d3866aa6..ebb90a36a 100644 --- a/test/transforms/fixtures/wrap-inline-at-range/with-data-object/output.yaml +++ b/test/transforms/fixtures/wrap-inline-at-range/with-data-object/output.yaml @@ -4,16 +4,13 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag data: key: value nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/wrap-inline-at-range/with-data/input.yaml b/test/transforms/fixtures/wrap-inline-at-range/with-data/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/wrap-inline-at-range/with-data/input.yaml +++ b/test/transforms/fixtures/wrap-inline-at-range/with-data/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-inline-at-range/with-data/output.yaml b/test/transforms/fixtures/wrap-inline-at-range/with-data/output.yaml index 0d3866aa6..ebb90a36a 100644 --- a/test/transforms/fixtures/wrap-inline-at-range/with-data/output.yaml +++ b/test/transforms/fixtures/wrap-inline-at-range/with-data/output.yaml @@ -4,16 +4,13 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag data: key: value nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/wrap-inline/across-blocks/input.yaml b/test/transforms/fixtures/wrap-inline/across-blocks/input.yaml index 4960c06f9..881deb1d9 100644 --- a/test/transforms/fixtures/wrap-inline/across-blocks/input.yaml +++ b/test/transforms/fixtures/wrap-inline/across-blocks/input.yaml @@ -4,11 +4,9 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word - kind: block type: paragraph nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/wrap-inline/across-blocks/output.yaml b/test/transforms/fixtures/wrap-inline/across-blocks/output.yaml index 2fabb8799..57d48f74f 100644 --- a/test/transforms/fixtures/wrap-inline/across-blocks/output.yaml +++ b/test/transforms/fixtures/wrap-inline/across-blocks/output.yaml @@ -4,14 +4,12 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: hashtag nodes: - kind: text - ranges: - - text: rd + text: rd - kind: block type: paragraph nodes: @@ -19,8 +17,6 @@ nodes: type: hashtag nodes: - kind: text - ranges: - - text: an + text: an - kind: text - ranges: - - text: other + text: other diff --git a/test/transforms/fixtures/wrap-inline/across-inlines/input.yaml b/test/transforms/fixtures/wrap-inline/across-inlines/input.yaml index 877fc950a..c17ccbcf2 100644 --- a/test/transforms/fixtures/wrap-inline/across-inlines/input.yaml +++ b/test/transforms/fixtures/wrap-inline/across-inlines/input.yaml @@ -7,11 +7,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: word + text: word - kind: inline type: link nodes: - kind: text - ranges: - - text: another + text: another diff --git a/test/transforms/fixtures/wrap-inline/across-inlines/output.yaml b/test/transforms/fixtures/wrap-inline/across-inlines/output.yaml index 21f86cab1..ac1ce70ca 100644 --- a/test/transforms/fixtures/wrap-inline/across-inlines/output.yaml +++ b/test/transforms/fixtures/wrap-inline/across-inlines/output.yaml @@ -7,8 +7,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: wo + text: wo - kind: inline type: hashtag nodes: @@ -16,8 +15,7 @@ nodes: type: link nodes: - kind: text - ranges: - - text: rd + text: rd - kind: inline type: hashtag nodes: @@ -25,11 +23,9 @@ nodes: type: link nodes: - kind: text - ranges: - - text: an + text: an - kind: inline type: link nodes: - kind: text - ranges: - - text: other + text: other diff --git a/test/transforms/fixtures/wrap-inline/nested-block/input.yaml b/test/transforms/fixtures/wrap-inline/nested-block/input.yaml index c4ac2e6c5..5c54eec1d 100644 --- a/test/transforms/fixtures/wrap-inline/nested-block/input.yaml +++ b/test/transforms/fixtures/wrap-inline/nested-block/input.yaml @@ -7,5 +7,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-inline/nested-block/output.yaml b/test/transforms/fixtures/wrap-inline/nested-block/output.yaml index 8847000bf..dda085eb1 100644 --- a/test/transforms/fixtures/wrap-inline/nested-block/output.yaml +++ b/test/transforms/fixtures/wrap-inline/nested-block/output.yaml @@ -7,14 +7,11 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/wrap-inline/single-block/input.yaml b/test/transforms/fixtures/wrap-inline/single-block/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/wrap-inline/single-block/input.yaml +++ b/test/transforms/fixtures/wrap-inline/single-block/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-inline/single-block/output.yaml b/test/transforms/fixtures/wrap-inline/single-block/output.yaml index fc07c88f4..7bfbe8b4b 100644 --- a/test/transforms/fixtures/wrap-inline/single-block/output.yaml +++ b/test/transforms/fixtures/wrap-inline/single-block/output.yaml @@ -4,14 +4,11 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/wrap-inline/with-data-object/input.yaml b/test/transforms/fixtures/wrap-inline/with-data-object/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/wrap-inline/with-data-object/input.yaml +++ b/test/transforms/fixtures/wrap-inline/with-data-object/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-inline/with-data-object/output.yaml b/test/transforms/fixtures/wrap-inline/with-data-object/output.yaml index 0d3866aa6..ebb90a36a 100644 --- a/test/transforms/fixtures/wrap-inline/with-data-object/output.yaml +++ b/test/transforms/fixtures/wrap-inline/with-data-object/output.yaml @@ -4,16 +4,13 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag data: key: value nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/fixtures/wrap-inline/with-data/input.yaml b/test/transforms/fixtures/wrap-inline/with-data/input.yaml index b1be31e90..27f668fe2 100644 --- a/test/transforms/fixtures/wrap-inline/with-data/input.yaml +++ b/test/transforms/fixtures/wrap-inline/with-data/input.yaml @@ -4,5 +4,4 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: word + text: word diff --git a/test/transforms/fixtures/wrap-inline/with-data/output.yaml b/test/transforms/fixtures/wrap-inline/with-data/output.yaml index 0d3866aa6..ebb90a36a 100644 --- a/test/transforms/fixtures/wrap-inline/with-data/output.yaml +++ b/test/transforms/fixtures/wrap-inline/with-data/output.yaml @@ -4,16 +4,13 @@ nodes: type: paragraph nodes: - kind: text - ranges: - - text: w + text: w - kind: inline type: hashtag data: key: value nodes: - kind: text - ranges: - - text: or + text: or - kind: text - ranges: - - text: d + text: d diff --git a/test/transforms/index.js b/test/transforms/index.js index 28ff0b4f9..7f2db575d 100644 --- a/test/transforms/index.js +++ b/test/transforms/index.js @@ -28,9 +28,9 @@ describe('transforms', () => { const input = readMetadata.sync(resolve(innerDir, 'input.yaml')) const expected = readMetadata.sync(resolve(innerDir, 'output.yaml')) - let state = Raw.deserialize(input) + let state = Raw.deserialize(input, { terse: true }) state = fn(state) - const output = Raw.serialize(state) + const output = Raw.serialize(state, { terse: true }) strictEqual(strip(output), strip(expected)) }) }