Skip to content

Commit 79912a1

Browse files
author
Andrew Scott
committed
Documentation
1 parent 14d57e7 commit 79912a1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,9 +506,10 @@ Replace each node in the current set with the contents provided.
506506

507507
``` php
508508
$doc = (new Document())->html('<p><b>Hello</b> <b>World!</b></p>');
509-
echo $doc->find('b')->substituteWith(function($node) {
509+
$doc->find('b')->substituteWith(function($node) {
510510
return '<em>' . $node->text() . '</em>';
511511
});
512+
echo $doc->html();
512513
```
513514

514515
*Result:*
@@ -535,7 +536,7 @@ echo $doc->find('.text')->text();
535536

536537
*Result:*
537538
``` html
538-
<div class="second"></div>
539+
Hello World!
539540
```
540541

541542
Set the text contents for current set.

0 commit comments

Comments
 (0)