diff --git a/src/Editor.php b/src/Editor.php index 7e5f879..7dc972c 100644 --- a/src/Editor.php +++ b/src/Editor.php @@ -126,11 +126,6 @@ public function descendants($closure): Editor */ private function walkThroughNodes(&$node, $closure) { - // Skip, if it’s just text. - if ($node->type === 'text') { - return; - } - // Call the closure. $closure($node); diff --git a/tests/Editor/DescendantsTest.php b/tests/Editor/DescendantsTest.php index facc755..a34ab82 100644 --- a/tests/Editor/DescendantsTest.php +++ b/tests/Editor/DescendantsTest.php @@ -73,9 +73,13 @@ 'bulletList', 'listItem', 'paragraph', + 'text', 'listItem', 'paragraph', + 'text', + 'text', 'paragraph', + 'text', ]); });