Skip to content

Commit 730870a

Browse files
committed
rename variable
1 parent 2b09a2c commit 730870a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ use Sinnbeck\HtmlAst\Ast\Parser;
8181
$ast = Parser::make($tokens);
8282

8383
// Parse tokens into an AST (node tree)
84-
$nodeTree = $ast->parse();
84+
$nodes = $ast->parse();
8585

8686
// Optionally, inspect the node tree:
87-
print_r($nodeTree);
87+
print_r($nodes);
8888
```
8989

9090
### Printing
@@ -95,15 +95,15 @@ The printer takes an HTML input or the resulting AST and renders it as neatly fo
9595
use Sinnbeck\HtmlAst\Printer;
9696

9797
// Create a Printer instance and render the HTML string
98-
echo Printer::make($nodeTree)->render();
98+
echo Printer::make($nodes)->render();
9999
```
100100

101101
If you need to indent all lines by a certain level, you can easily do so.
102102
```php
103103
use Sinnbeck\HtmlAst\Printer;
104104

105105
// Indents everything by 1 extra indentation level
106-
echo Printer::make($nodeTree)->render(1);
106+
echo Printer::make($nodes)->render(1);
107107
```
108108

109109
By default the output is indented with 4 spaces.
@@ -112,7 +112,7 @@ This can be easily changed by calling `->withIndent()`
112112
use Sinnbeck\HtmlAst\Printer;
113113

114114
// Indents with tab instead of 4 spaces
115-
echo Printer::make($nodeTree)->indentWith("\t")->render();
115+
echo Printer::make($nodes)->indentWith("\t")->render();
116116
```
117117

118118
## Testing

0 commit comments

Comments
 (0)