2016-04-14 12:02:31 +02:00
|
|
|
<?php namespace Todaymade\Daux\ContentTypes\Markdown;
|
2016-04-12 08:38:52 +02:00
|
|
|
|
|
|
|
use League\CommonMark\Block\Element\AbstractBlock;
|
|
|
|
use League\CommonMark\Cursor;
|
|
|
|
|
2016-04-14 12:02:31 +02:00
|
|
|
class TableOfContents extends AbstractBlock
|
2016-04-12 08:38:52 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if this block can contain the given block as a child node
|
|
|
|
*
|
|
|
|
* @param AbstractBlock $block
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function canContain(AbstractBlock $block)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if block type can accept lines of text
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function acceptsLines()
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether this is a code block
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function isCode()
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param Cursor $cursor
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function matchesNextLine(Cursor $cursor)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|