League\CommonMark\ElementRendererInterface::renderBlocks PHP Method

renderBlocks() public method

public renderBlocks ( AbstractBlock[] $blocks, boolean $inTightList = false ) : string
$blocks League\CommonMark\Block\Element\AbstractBlock[]
$inTightList boolean
return string
    public function renderBlocks($blocks, $inTightList = false);

Usage Example

 /**
  * @param AbstractBlock|Document   $block
  * @param ElementRendererInterface $htmlRenderer
  * @param bool                     $inTightList
  *
  * @return string
  */
 public function render(AbstractBlock $block, ElementRendererInterface $htmlRenderer, $inTightList = false)
 {
     if (!$block instanceof Document) {
         throw new \InvalidArgumentException('Incompatible block type: ' . get_class($block));
     }
     $wholeDoc = $htmlRenderer->renderBlocks($block->children());
     return $wholeDoc === '' ? '' : $wholeDoc . "\n";
 }
All Usage Examples Of League\CommonMark\ElementRendererInterface::renderBlocks