Commit 7756a30
authored
Scan embedded_templates to locate additional functions
Add a check for `\Twig\Node\ModuleNode` instances when traversing the nodes.
When found, grab the `embedded_templates` attribute, an array of `\Twig\Node\ModuleNode` instances for each embed or include in a template.
Then loop and scan these as we do child nodes.
This resolves #5 and allows for nested blocks to be scanned for functions.1 parent 4726dd9 commit 7756a30
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
| |||
0 commit comments