Split body even if images are wrapped in a figure or paragraph element.
{
$this->title;
$rest = fread($this->file, filesize($this->page));
{
$this->title;
$rest = fread($this->file, filesize($this->page));
- if ( preg_match('{\n<p>(<img [^>]*>)</p>|\n<hr />}', $rest, $img, PREG_OFFSET_CAPTURE) ) {
+ if ( preg_match('{\n < (?: p | figure [^>]* ) > (<img\ [^>]*>) | \n <hr\ />}x', $rest, $img, PREG_OFFSET_CAPTURE) ) {
if (isset($img[1])) {
$this->img = $img[1][0];
}
if (isset($img[1])) {
$this->img = $img[1][0];
}