1
0

Fix: Markdown was wrapped with html/body tags

This commit is contained in:
Richard Dern 2024-05-03 16:43:39 +02:00
parent be6d443a13
commit 67c3dd73cb

View File

@ -155,6 +155,13 @@ protected function removeEmptyCodeLines(string $html): string
} }
} }
return $dom->saveHTML(); $finalHtml = '';
$bodyTag = $dom->documentElement->getElementsByTagName('body')->item(0);
foreach ($bodyTag->childNodes as $rootLevelTag) {
$finalHtml .= $dom->saveHTML($rootLevelTag);
}
return $finalHtml;
} }
} }