protected function containsBlock(DOMElement $paragraph)
    {
        $xpath = new DOMXPath($paragraph->ownerDocument);
        $containedExpression = $this->getContainmentMapXPathExpression(false);

        return
            $xpath->query($containedExpression, $paragraph)->length !== 0
            || $xpath->query('custom/paragraph', $paragraph)->length !== 0
            || $xpath->query('custom/section', $paragraph)->length !== 0
        ;
    }