private function markTemporaryParagraphs($document)
    {
        /** @var \DOMElement $paragraph */
        foreach ($document->getElementsByTagName('paragraph') as $paragraph) {
            if ($this->isTemporary($paragraph)) {
                $paragraph->setAttribute('ez-temporary', 1);
            }
        }
    }