diff --git a/src/Transformers/BardTransformer.php b/src/Transformers/BardTransformer.php index 536b8a2..2fceb3f 100644 --- a/src/Transformers/BardTransformer.php +++ b/src/Transformers/BardTransformer.php @@ -31,13 +31,6 @@ public function transform(string $value): array $value = collect($value) ->map(function (array $node): ?array { - if ($node['type'] === 'text') { - return [ - 'type' => 'paragraph', - 'content' => [$node], - ]; - } - if ($node['type'] === 'image' && $this->field->get('container') && isset($this->config['assets_base_url'])) { $assetContainer = AssetContainer::find($this->field->get('container')); @@ -64,7 +57,6 @@ public function transform(string $value): array return $node; }) ->filter() - ->values() ->all(); $this->enableBardButtons($value); diff --git a/tests/Transformers/BardTransformerTest.php b/tests/Transformers/BardTransformerTest.php index 835baee..08eecec 100644 --- a/tests/Transformers/BardTransformerTest.php +++ b/tests/Transformers/BardTransformerTest.php @@ -83,29 +83,6 @@ public function it_converts_html_to_prosemirror() ]], $output); } - #[Test] - public function it_handles_text_without_paragraph_tags() - { - $transformer = new BardTransformer( - import: $this->import, - blueprint: $this->blueprint, - field: $this->field, - config: [] - ); - - $output = $transformer->transform(<<<'HTML' -