mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-22 06:40:01 +08:00
Updated page includes to be top-level for code blocks
This change means that code blocks are now included still wrapped in their pre tags, as we do for tables and lists. Previously the <code> inner content would be included which would lead to a generally bad/broken presentation. Hopefully should not be a breaking change as section include tags for code was tricky to get to, and it was in a semi-broken state. For #2406
This commit is contained in:
@ -390,7 +390,7 @@ class PageContent
|
||||
*/
|
||||
protected function fetchSectionOfPage(Page $page, string $sectionId): string
|
||||
{
|
||||
$topLevelTags = ['table', 'ul', 'ol'];
|
||||
$topLevelTags = ['table', 'ul', 'ol', 'pre'];
|
||||
$doc = $this->loadDocumentFromHtml($page->html);
|
||||
|
||||
// Search included content for the id given and blank out if not exists.
|
||||
|
Reference in New Issue
Block a user