%PDF- %PDF-
Direktori : /var/www/html/hr/api/vendor/league/commonmark/src/Extension/Strikethrough/ |
Current File : /var/www/html/hr/api/vendor/league/commonmark/src/Extension/Strikethrough/StrikethroughRenderer.php |
<?php /* * This file is part of the league/commonmark package. * * (c) Colin O'Dell <colinodell@gmail.com> and uAfrica.com (http://uafrica.com) * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace League\CommonMark\Extension\Strikethrough; use League\CommonMark\ElementRendererInterface; use League\CommonMark\HtmlElement; use League\CommonMark\Inline\Element\AbstractInline; use League\CommonMark\Inline\Renderer\InlineRendererInterface; final class StrikethroughRenderer implements InlineRendererInterface { /** * {@inheritdoc} */ public function render(AbstractInline $inline, ElementRendererInterface $htmlRenderer) { if (!($inline instanceof Strikethrough)) { throw new \InvalidArgumentException('Incompatible inline type: ' . get_class($inline)); } return new HtmlElement('del', $inline->getData('attributes', []), $htmlRenderer->renderInlines($inline->children())); } }