WordpressPostTransformer::wpautop
Replaces double line-breaks with paragraph elements.
A group of regex replaces used to identify text formatted with newlines and replace double line-breaks with HTML paragraph tags. The remaining line-breaks after conversion become <<br />> tags, unless $br is set to '0' or 'false'. Source originally from Wordpress.
Signature
public function wpautop(string
$pee,
[integer
$br = 1] )
Parameters
$pee
— string- The text which has to be formatted.
$br
— integer- Optional. If set, this will convert all remaining line-breaks after paragraphing. Default true.
Returns
- string
- Text which has been converted into correct paragraph tags.