protected function renderContent(ContentBlock $block)
    {
        $content = $block->getContent();

        switch ($block->getType())
        {
            case 'line':
                $content = htmlspecialchars($content);
                break;

            case 'text':
                $content = htmlspecialchars($content);
                $content = str_replace("\n", '<br>', $content);
                break;

            case 'markdown':
                $content = $this->markdownHelper->transform($content);
                break;

            case 'html':
                break;

            default:
                throw new \InvalidArgumentException('Unknown content block type: ' . $block->getType());
        }

        return $content;
    }