From: jasonF1000 Date: Thu, 27 Apr 2023 14:51:46 +0000 (+0200) Subject: changed PageContent.php to accept nested includes (#4192) X-Git-Tag: v23.05~1^2~12 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/011800d42526ebb4acce4ce001dc53b97995ad53 changed PageContent.php to accept nested includes (#4192) * changed app/Entities/Tools/PageContent.php to accept nested include levels. Tested it and it works. * changed recommendations This loop is now only around parsePageIncludes and bugfixes the space indentation. * Update PageContent.php fix spaces --- diff --git a/app/Entities/Tools/PageContent.php b/app/Entities/Tools/PageContent.php index b4bc8b91b..67f3ea338 100644 --- a/app/Entities/Tools/PageContent.php +++ b/app/Entities/Tools/PageContent.php @@ -303,8 +303,10 @@ class PageContent if ($blankIncludes) { $content = $this->blankPageIncludes($content); - } else { - $content = $this->parsePageIncludes($content); + } else { + for ($includeDepth = 0; $includeDepth <= 3; $includeDepth++) { + $content = $this->parsePageIncludes($content); + } } return $content;