for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This is part of the webuni/commonmark-attributes-extension package.
*
* (c) Martin Hasoň <[email protected]>
* (c) Webuni s.r.o. <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Webuni\CommonMark\AttributesExtension;
use League\CommonMark\Block\Element\AbstractBlock;
use League\CommonMark\ContextInterface;
use League\CommonMark\Cursor;
class Attributes extends AbstractBlock
{
private $attributes;
public function __construct($attributes)
parent::__construct();
$this->attributes = $attributes;
}
public function getAttributes()
return $this->attributes;
public function canContain(AbstractBlock $block)
return false;
public function acceptsLines()
public function isCode()
public function matchesNextLine(Cursor $cursor)
if ($cursor->isBlank()) {
$this->setLastLineBlank(true);
} else {
$this->setLastLineBlank(false);
public function shouldLastLineBeBlank(Cursor $cursor, $currentLineNumber)
public function handleRemainingContents(ContextInterface $context, Cursor $cursor)