1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Includes: Developed to get new system working with inline includes

Adds logic for locating and splitting text nodes.
Adds specific classes to offload tag/content specific logic.
This commit is contained in:
Dan Brown
2023-11-23 14:29:07 +00:00
parent 04d21c8a97
commit 75936454cc
5 changed files with 192 additions and 8 deletions

View File

@ -37,7 +37,7 @@ class PageIncludeParserTest extends TestCase
protected function runParserTest(string $html, array $contentById, string $expected)
{
$parser = new PageIncludeParser($html, function (int $id) use ($contentById) {
return $contentById[strval($id)] ?? null;
return $contentById[strval($id)] ?? '';
});
$result = $parser->parse();