Exemple #1
0
 private function processInlines(ContextInterface $context, AbstractBlock $block)
 {
     if ($block instanceof AbstractInlineContainer) {
         $cursor = new Cursor(trim($block->getStringContent()));
         $block->setInlines($this->inlineParserEngine->parse($context, $cursor));
     }
     foreach ($block->getChildren() as $child) {
         $this->processInlines($context, $child);
     }
 }
 private function processInlines(ContextInterface $context, NodeWalker $walker)
 {
     while (($event = $walker->next()) !== null) {
         if (!$event->isEntering()) {
             continue;
         }
         $node = $event->getNode();
         if ($node instanceof InlineContainer) {
             $this->inlineParserEngine->parse($node, $context->getDocument()->getReferenceMap());
         }
     }
 }