[PR #1601] [CLOSED] feature: support nested inclusions #5839

Closed
opened 2026-02-05 10:18:27 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/1601
Author: @scrooloose
Created: 8/28/2019
Status: Closed

Base: masterHead: feature/support_nested_inclusions


📝 Commits (1)

  • a84c85e feature: support nested inclusions

📊 Changes

1 file changed (+12 additions, -3 deletions)

View changed files

📝 app/Entities/Repos/EntityRepo.php (+12 -3)

📄 Description

Previously we could only support one level of page inclusion. So, if we
have a three pages with this content:

Page one: 'Test'

Page two: 'Include page one: {{@1}}'

Page three: 'Include page two: {{@2}}'

Rendering 'Page three' would not expand the nested includes, and would
result in:

Include page two: Include page one: {{@1}}

To fix this we just keep expanding the includes until there are none
left.

Extract out the regex that matches the includes into a constant - since
this is now used in three places.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/1601 **Author:** [@scrooloose](https://github.com/scrooloose) **Created:** 8/28/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feature/support_nested_inclusions` --- ### 📝 Commits (1) - [`a84c85e`](https://github.com/BookStackApp/BookStack/commit/a84c85e5d38798ca6a923769f056e1c35d941dd5) feature: support nested inclusions ### 📊 Changes **1 file changed** (+12 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `app/Entities/Repos/EntityRepo.php` (+12 -3) </details> ### 📄 Description Previously we could only support one level of page inclusion. So, if we have a three pages with this content: Page one: 'Test' Page two: 'Include page one: {{@1}}' Page three: 'Include page two: {{@2}}' Rendering 'Page three' would not expand the nested includes, and would result in: Include page two: Include page one: {{@1}} To fix this we just keep expanding the includes until there are none left. Extract out the regex that matches the includes into a constant - since this is now used in three places. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:18:27 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5839