Skip to content

Commit ce0b752

Browse files
committed
Set page include limit to be 3 as expected instead of 4
1 parent 4bb2b31 commit ce0b752

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/Entities/Tools/PageContent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ public function render(bool $blankIncludes = false): string
304304
if ($blankIncludes) {
305305
$content = $this->blankPageIncludes($content);
306306
} else {
307-
for ($includeDepth = 0; $includeDepth <= 3; $includeDepth++) {
307+
for ($includeDepth = 0; $includeDepth < 3; $includeDepth++) {
308308
$content = $this->parsePageIncludes($content);
309309
}
310310
}

tests/Entity/PageContentTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ public function test_page_includes_can_be_nested_up_to_three_times()
116116
$page->save();
117117

118118
$pageResp = $this->asEditor()->get($page->getUrl());
119-
$this->withHtml($pageResp)->assertElementContains('#bkmrk-test', 'Hello Barry Hello Barry Hello Barry ' . $tag);
119+
$this->withHtml($pageResp)->assertElementContains('#bkmrk-test', 'Hello Barry Hello Barry Hello Barry Hello Barry ' . $tag);
120+
$this->withHtml($pageResp)->assertElementNotContains('#bkmrk-test', 'Hello Barry Hello Barry Hello Barry Hello Barry Hello Barry ' . $tag);
120121
}
121122

122123
public function test_page_content_scripts_removed_by_default()

0 commit comments

Comments
 (0)