protected function findHeadlines($markdown, $fromLevel = 1, $toLevel = 6) {
        $headlines = [];
        foreach ($this->parseBlocks($this->splitLines($markdown)) as $block) {
            if ($this->isItemOfType($block, 'headline') && isset($block['level'])
                && $block['level'] >= $fromLevel && $block['level'] <= $toLevel
            ) {
                $headlines[] = $block;
            }
        }
        return $headlines;
    }