- Replaces line breaks with empty paragraphs
This commit is contained in:
@ -72,7 +72,9 @@ class StructureTransformer {
|
|||||||
} else {
|
} else {
|
||||||
return array(
|
return array(
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'text' => $item->toString(),
|
'text' => ($item->getNextSibling()) ?
|
||||||
|
preg_replace('/\n/', "<p> </p>", $item->toString()) :
|
||||||
|
$item->toString()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user