Repository navigation
Allowing child nodes with 2.0 API #791
|
I'm trying to "port" a client's custom syntax/blocks to the new API and I'm stuck on a block which basically serves as a wrapper around images and looks something like this: (Most cases are more complex than that but that's an easy case I'm trying to get working first.) I've got everything seemingly working, except that in the generated HTML, only the wrapper is outputted. While debugging inside the renderer, I see that <?php
final class GGDivParser extends AbstractBlockContinueParser implements BlockContinueParserInterface
{
// …
public function isContainer(): bool
{
return true;
}
public function canContain(AbstractBlock $childBlock): bool
{
return true;
}
}I basically based my code off of the Before I bash my head against a wall too much more, can anyone spot any reason why the node isn't getting any children under it? |
Replies: 1 comment
|
I managed to figure it out. I had a |
I managed to figure it out. I had a
canHaveLazyContinuationLinesmethod returning true; I misunderstood what that does. (I think it's only for blocks which have to start with a certain character like how blockquotes use>.) After commenting that method out, my code is working as expected.