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
|
|
|
|
*/
|
2019-11-28 22:36:26 +01:00
|
|
|
public function canContain(AbstractBlock $block): bool
|
2016-04-12 08:38:52 +02:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether this is a code block
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
2019-11-28 22:36:26 +01:00
|
|
|
public function isCode(): bool
|
2016-04-12 08:38:52 +02:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param Cursor $cursor
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
2019-11-28 22:36:26 +01:00
|
|
|
public function matchesNextLine(Cursor $cursor): bool
|
2016-04-12 08:38:52 +02:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|