]> BookStack Code Mirror - bookstack/commitdiff
changed PageContent.php to accept nested includes (#4192)
authorjasonF1000 <redacted>
Thu, 27 Apr 2023 14:51:46 +0000 (16:51 +0200)
committerGitHub <redacted>
Thu, 27 Apr 2023 14:51:46 +0000 (15:51 +0100)
* 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

app/Entities/Tools/PageContent.php

index b4bc8b91b13cd680f3119822bd82b86ec9d67e6e..67f3ea338f981849762247c66548972dd879b934 100644 (file)
@@ -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;