private function replaceWhitespacesInInlineElements($element, PlaceholderContainer $placeholderContainer)
    {
        return preg_replace_callback('/>\s/', function ($match) use ($placeholderContainer) {
            return '>'.$placeholderContainer->createPlaceholder(' ');
        }, $element);
    }