protected function processMarkdown()
    {
        /** @var Config $config */
        $config = Grav::instance()['config'];

        $defaults = (array)$config->get('system.pages.markdown');
        if (isset($this->header()->markdown)) {
            $defaults = array_merge($defaults, $this->header()->markdown);
        }

        // pages.markdown_extra is deprecated, but still check it...
        if (!isset($defaults['extra']) && (isset($this->markdown_extra) || $config->get('system.pages.markdown_extra') !== null)) {
            user_error('Configuration option \'system.pages.markdown_extra\' is deprecated since Grav 1.5, use \'system.pages.markdown.extra\' instead', E_USER_DEPRECATED);

            $defaults['extra'] = $this->markdown_extra ?: $config->get('system.pages.markdown_extra');
        }

        // Initialize the preferred variant of Parsedown
        if ($defaults['extra']) {
            $parsedown = new ParsedownExtra($this, $defaults);
        } else {
            $parsedown = new Parsedown($this, $defaults);
        }

        $this->content = $parsedown->text($this->content);
    }