Consider this php code:
$content = '<img />'."
".'<img />';
$doc = new DomDocument();
$doc->loadHTML($content);
echo $doc->saveHTML();
The output (including the wrapping HTML/body etc) gives me:
<img><img>
with no space between the images.
Calling:
$doc->preserveWhiteSpace = true;
doesn't change anything.
How do I preserve the white space in the original HTML?