- Replaces line breaks with empty paragraphs

This commit is contained in:
Vlad
2016-12-28 19:30:52 -05:00
parent d2b41a5b90
commit fb29800c7d

View File

@ -72,7 +72,9 @@ class StructureTransformer {
} else {
return array(
'type' => 'text',
'text' => $item->toString(),
'text' => ($item->getNextSibling()) ?
preg_replace('/\n/', "<p>&nbsp;</p>", $item->toString()) :
$item->toString()
);
}