git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0c8ab2
)
nieuws: hide text after cover image in overviews
author
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 23 Nov 2018 15:28:15 +0000
(16:28 +0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 23 Nov 2018 15:28:15 +0000
(16:28 +0100)
Find standalone image at any position, and cut following contents in body.
nieuws.inc.php
patch
|
blob
|
history
diff --git
a/nieuws.inc.php
b/nieuws.inc.php
index e5e1ffa3664c764d2a292c8da87be1311baafda9..b58def7b7302bdad9ac4e41cc7e93c1155d6cbb2 100644
(file)
--- a/
nieuws.inc.php
+++ b/
nieuws.inc.php
@@
-78,7
+78,7
@@
class ArchiveArticle
{
$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]);
}