Sha256: 139d30f260167b4f7c53d15e5dc58712bf253e4aa56194150d73f6e7cc94c821
Contents?: true
Size: 610 Bytes
Versions: 1
Compression:
Stored size: 610 Bytes
Contents
<?php namespace MtHaml\Filter\Markdown; use League\CommonMark\DocParser; use League\CommonMark\HtmlRenderer; use MtHaml\Filter\Markdown; class CommonMark extends Markdown { private $parser; private $renderer; public function __construct(DocParser $parser, HtmlRenderer $renderer, $forceOptimization = false) { parent::__construct($forceOptimization); $this->parser = $parser; $this->renderer = $renderer; } public function filter($content, array $context, $options) { return $this->renderer->renderBlock($this->parser->parse($content)); } }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
guard-mthaml-0.4.0 | vendor/mthaml/mthaml/lib/MtHaml/Filter/Markdown/CommonMark.php |