Find standalone image at any position, and cut following contents in body.
{
$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>\s*\z}', $rest, $img, PREG_OFFSET_CAPTURE) ) {
+ if ( preg_match('{\n<p>(<img [^>]*>)</p>}', $rest, $img, PREG_OFFSET_CAPTURE) ) {
$this->img = $img[1][0];
return substr($rest, 0, $img[0][1]);
}
$this->img = $img[1][0];
return substr($rest, 0, $img[0][1]);
}