diff --git a/README.md b/README.md index fa75710..a11f118 100644 --- a/README.md +++ b/README.md @@ -506,9 +506,10 @@ Replace each node in the current set with the contents provided. ``` php $doc = (new Document())->html('
Hello World!
'); -echo $doc->find('b')->substituteWith(function($node) { +$doc->find('b')->substituteWith(function($node) { return '' . $node->text() . ''; }); +echo $doc->html(); ``` *Result:* @@ -535,7 +536,7 @@ echo $doc->find('.text')->text(); *Result:* ``` html - +Hello World! ``` Set the text contents for current set.